Recently I wanted to create a filter for the calendar in sharepoint. What I was looking for, is having a filter that would show me the events from last week, and the events in the upcoming two weeks.
Too bad that the start date and end date of the calendar within sharepoint cannot be filtered. You simply cannot choose start date or end date within the filter options delivered by sharepoint. So how to still get the filter on the dates of the calendar?
Add two columns
Add two columns to the calendar. Say _startdate and _enddate. Make them both calculated fields, and assign ‘start date’ to ‘_startdate’ and ‘end date’ to ‘_enddate’. Make sure that both _startdate and _enddate return only ‘date’ and not ‘date and time’.
Filter the view
Alter / create the view in which you want to apply the date filter on the calendar. Now add a filter, and you’ll see you can select ‘_startdate’ and ‘_enddate’. For me, I used the following filter:
is greater than or equal to
is less than or equal to
This ensures me that I now get to see all events from the last seven days, up to the next 14 days, including re-occurring events.