i’m stuck with a page notification that contains a current notice regarding holiday times, therefor i only want it to show during a defined period of time. the customer should be able to select the start and end date using the date/time field within the collection.
Using conditional visibility or filter option with the options “is after or equal to …” and “is before or equal to …” i couldn’t get the desired results.
Maybe this problem could be solved with some custom code?
If it’s in the CMS, the collection list filtering feature works great.
Add start date and end date to your collection
In the filter settings you want two rules;
Start date <= today
End date >= today
That tells you the event is happening now, as defined by server time, adjusted to the timezone you’ve set for your site.
The wording is a bit convoluted.
IIRC, you define it as Start Date / is before / 0 days / in the past.
It will recognize what you’re trying to do and rewrite it.
Same approach for End Date / is after / 0 days / in the future.
[ Added ] - here’s a writeup on the different approaches.