1

When I run the code below, I get the correct start time for an event, but the same value is output for the event_last_date (the end time that is output is the same value as the start time….)

Any Ideas?

{exp:calendar:cal sort="asc" dynamic="no" calendar_name="kaharoa-school-events" date_range_start="today" show_months="3"}

{display_each_month}                

<p><h3 class="secondary_title">{date format="%F"}</h3></p>
{if month_event_total == "0"}<p><strong>There are no events scheduled this month</strong></p>{/if} 
{events}
<li><strong>{event_start_date format="%d"} - {title} </strong> 

<p><strong>When:</strong> {event_first_date format="%g:%i%a"}
{if event_never_ends}
(never ends)
{if:else}
{if "{event_first_date format='%Y%m%d%g%i%a'}" != "{event_last_date format='%Y%m%d%g%i%a'}"} <b>to:</b>
{if "{event_first_date format="%Y%m%d"}" != "{event_last_date format="%Y%m%d"}"}
{event_last_date format="%l, %F %j, %Y at %g:%i%a"}
{if:else}
{event_last_date format="%g:%i%a"}
{/if}
{/if}
{/if}
</p>
{if event_location}<p><strong>Where: {event_location}</strong>{/if}
{if event_summary}<p><strong>Details:</strong> {event_summary}</p>{/if}

</li> 
{/events}                        
{/display_each_month}         
{/exp:calendar:cal} 
2
  • Hi @Kokako. Can you please format your post correctly, using code blocks.
    – Michael P
    Dec 2 '13 at 10:40
  • Also, please provide the EE and Calendar version numbers that you are using. Can you also try to remove as many conditionals as possible to have a simple event_first_date and event_last_dat display? Just to remove possible unclosed conditionals as the culprit.
    – Solspace
    Dec 2 '13 at 22:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.