Restrict Results Date Range and Calendar Events Search pages


(Douglas (@finnatic at @waikato)) #1

Matrix Version: 5.4.1.2

The Calendar Events Search page asset has on the Search Fields screen a section to configure a Restrict Results Date Range.

I was expecting it to operate off the event dates, but after some trial and WTF-learning, have realised that the drop down for the date field to restrict by only contains ‘Created Date’, ‘Last Modified Date’ and ‘Last Published Date’.

Shouldn’t it allow event date fields?

Since events may be created, modified and published long before they occur, this doesn’t seem to be a reliable filter to select past or future events that were created and occurred during the desired $Daterange.


(Bart Banda) #2

The Restrict Results Date Range field is inherited from the standard Search Page, which targets generic asset functionality.

What are you trying to do? Just not show calendar events that are within a certain date range or relative to the current date?


(Douglas (@finnatic at @waikato)) #3

I’m trying to show all past events up to a certain number of past days e.g. for day where today is day X, show day X-1 through to day X-90, under a ‘past events’ heading.

What I think we’ll need to do is an anytime fuzzy date field, and then use SSJS or JS to remove any events for day X.


(Bart Banda) #4

Oh right. Yea unfortunately there is no “nice” way of doing that with the current available list of drop down selections for that field.

It’d be nice if we had a way to select “Show me events from X number days/weeks/month/years in the past/present”.

You probably have to figure out the exact date range and use the date range filtering for that. You could maybe also have a trigger that moves past events to a separate folder, or adds a metadata value, and do your search filtering on that?


(Douglas (@finnatic at @waikato)) #5

That would be nice. It’s what’s there for future + current events, but not past events.

Rolling my own solution for now with JS.