unionco / calendarize

Calendar Field Type for CraftCMS
MIT License
18 stars 13 forks source link

How to list events currently taking place? #81

Open tomkiss opened 2 years ago

tomkiss commented 2 years ago

Hello,

I'm using this plugin's fieldtype on event entries, and in my templates I'd like to display a list of all the currently active events. Most of these events repeat annually; e.g: June 1st to June 30th Pride month, June 30th to August 20th Summer Sale or December 20th to December 27th Christmas season etc.

In my template then, I'm simply looking to say "The day is today, show all events that are currently taking place" (i.e: todays date falls between the before and after dates set on an entries calendarize field).

I can just about achieve this using some of the plugin functionality and twig loops etc, although my template code is a little heavy handed and I wanted to ask the plugin creators how they would achieve this data extraction.

Any help appreciated, thank you!