Event filter date range not understanding invalid date range?


(Awilliams) #1

Matrix Version:5.3.4.0
Hi all, I’ve created an events search that uses the %event_filter_date_range% keyword.
Now it all looks fine and dandy and works, until you enter an invalid date range, for example 1-31 September. Because it lists days from 1-31 it is possible to choose this range and the results returned just display the keywords for the layout rather than the results.

If I change it to 1-30 September, it works fine. Is this a bug or is there some way I can stop this happening?

You can see it in action here: http://www.dartmoor.gov.uk/enjoy-dartmoor/events/events-list

Any advice would be greatly appeciated.

Thanks

Amanda


(Bart Banda) #2

That sounds like a bug, not sure if it has been fixed in later versions, but it should ideally just try and find the closest matching date rather than showing unreplaced keywords.

I think the workaround for now would be to implement some JS to check if the date is valid if the user changes any of the values. Alternatively add a date picker plugin that sits on top of that and populates the right values when a date is picked from it.