Todays date as default value for Date Range filter? #4134
-
Hi, I would like to know is it somehow possible (or maybe in the future) to add today's date as default value for Date Range filter? So I have a page where I have search results webpart which pulls Events from a site event calendar and it shows all events in ascending or descending order. Ascending order is not good because it shows first all the past events and descending order is not good because it show first all the future events and when there are many past/future events, user might need to scroll down a lot to see the events that are coming in the next coming days. Ideal solution would be to show only events that are today on in the future and use ascending order by default. I can do that by adding EventsRollUpStartDate:>=Today to the search query, but then I cannot use Date Range filter to search past events since the query only searches Events that are >=Today. So I think only option would be a default value in the Filter webpart so that I would se today's date as default value and use Date Range filter and if the user wants to search older events, he could just select a different date from the Date Range filter. Any thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What if you have two web parts. One which shows >= today, and one which shows < today? Then use a vertical web part to allow switching between them? For the one with <= you can use the date range filter. |
Beta Was this translation helpful? Give feedback.
If you want a different behavior or solution you need a developer to PR a change to the web parts.