Hi
I need to create some date filters on the frontend for events. I have a start date field (timestamp) - evcal_srow and and end date field - evcal_erow.
I can create two date pickers for the start and end and these work. But my problem is that I should have a default query filter like all events from now. But that interferes with the query filters the date pickers set.
Basically I would need to check for a range of dates: datepicker 1: starting date of search, datepicker 2: ending date of search. But I have two dates for every event so the filter should show all the events that fall between the date range set by the two date pickers of the frontend filters.
And I also should make some a button for events of current week, events of current month, all events from now on.
I don't want to search separately for start and end date. Just to find events between 2 given dates. I solved it like this: hidden link. I uploaded two screenshots. I set the default value of the first URL parameter to TODAY() so this way the grid will show events from today on.
But I guess I cannot create some predefined date range buttons now: events of current week, events of current month, all events from now on. Because I cannot create other query filters with my two date fields. Or is there a way? I thought to create links with given URL parameters but how can I pass a date function like THIS_MONTH() in a URL parameter?
Yes this method will work really well for just having 2 filters.
I see what you mean with this. Since the date is stored as number or EPOCH time stamp then you wouldn't be able to filter for just a month. It has to be filtered for the entire date.
So it wouldn't be possible because of how the date is being stored.