We need to tell whether the user has chosen a specific date or has just defaulted to our calendar:
example.com/calendar
example.com/calendar/11/31/2013
We're trying the following:
{if segment_2 == ""}
{exp:calendar:cal date_range_start="today" date_range_end="today" show_days="1" pad_short_weeks="n"}
{if:else}
{exp:calendar:cal date_range_start="{segment_4}-{segment_2}-{segment_3}" date_range_end="{segment_4}-{segment_2}-{segment_3}" show_days="1" pad_short_weeks="n"}
{/if}
... do stuff with the events for the given day here.
{/exp:calendar:cal}
When we go to the /calendar
page all of the data returned is fine, however, when we go to a specific date page, the data returned is for the current day (ie the data that's returned on the /calendar
page).
Does anybody know as to why this is happening?