I am using Calendar in an attempt to display an Event as a single entry. I have previous events and upcoming events. I need to display the "Current Event". In other words, if the event spans the dates 9-15-2015, 9-16-2015, and 9-17-2015 I need to display it if today is 9-16-2015. If there is NOT an event spanning the current date, I need to show the NEXT event in the calendar. I am using a single calendar for this site.
I want the user to be able to enter a 'range' or add rules as seperate days and times. For that reason, I have this in my date/time display:
{if event_has_rules}
{rules}
{/rules}
{/if}
{if event_recurs}
{occurrences}
<span style="color:#7e7f81;">{occurrence_start_date format="%l %m-%d-%Y"} — {occurrence_start_date format="%g:%i%a"} - {occurrence_end_date format="%g:%i%a"}</span></br>
{/occurrences}
{/if}
I haven't quite figured the rules syntax without blowing up my template yet though...
My primary issue is with displaying the "current" event.
I have this right now:
{exp:calendar:events
calendar_id="20"
event_limit="1"
date_range_start="{current_time format='%Y-%m-%d @ %h:%i %A'}"
show_days="-14"
dynamic="no"
}
I tried the -14 in an attempt to catch anything starting 14 days before the current day.
I also tried without the date_range_start in there at all.