1

I'm using the calendar:cal tag to display a list of upcoming events.

I'm having an issue where the first occurrence date displays as the next event date, rather than the next occurrence.

How can I code it so the event date is the next occurrence rather than the first event date?

{exp:calendar:cal date_range_start="today @ midnight" show_years="1" pad_short_weeks="n" event_limit="10" status="Open|Featured"}

    {if no_results}
        <p>There are no upcoming Events.</p>
    {/if}

    <div class="event">
        <div class="date">
            <span class="day">{event_first_date format="%j"}</span>
            <span class="month">{event_first_date format="%M"}</span>
        </div>
        <div class="summary">
            <h3><a href="{path="events/view/{categories}{category_url_title}{/categories}/{url_title}"}">{title}</a></h3>

        </div>
    </div>
{/exp:calendar:cal}

1 Answer 1

1

You should be using {event_start_date} instead of {event_first_date}.

{event_first_date} will always be the date of the first occurrence of an event (i.e. the first date of your event), whereas {event_start_date}, when used in {exp:calendar:cal}, will be the start date of each occurrence.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.