SharePoint Calendars with Event Date Content Search Web Parts in Office 365

SharePoint Calendars with Event Date Search

SharePoint Calendars are often rendered as a virtual calendar. However, with Search web parts and calculated event date filters in Office 365, the discovery of relevant events and information can be greatly improved.

SharePoint Calendars are Just a List of Events

Calendars should be thought of as a list of events, not a rigidly classic graphical view of a calendar. That is, a calendar DOES NOT need to be presented in SharePoint like this:

Business Management O365 SharePoint default calendar view.

In a lot of cases, this is the worst view of a calendar to use in SharePoint pages. It’s hard to clearly see what’s happening on a specific date, difficult to navigate, complex to visually customize, and so on.

Note that the content type of items in calendar lists is, Event. You can see this if you create a Calendar App and navigate to list settings:

Calendar content type.

Below I demonstrate the default Event content type and how to take advantage of the content type’s site column managed properties needed for search web parts and calculated date filters.

SharePoint Calendars Web Part with Event Date Filters

The only thing needed is the SharePoint Content Search Web Part (CSWP). The solution will start with the out-of-the-box Calendar Web Part to share events that are only relevant to Sales Division teams on the Sales Division home site. In this scenario, there will be a Calendar list with Quarterly Kick Off events.

After configuration, a calendar web part is added to the home page and a filter is added to only show events that are starting within 5 days of the current date. For this sample/demo, see the video below:

Create the Calendar List

With the calendar created, let’s now get away from the classic calendar view.

Add the SharePoint Calendar to the Home Page and Apply Event Date Filter

That’s it, nothing else is needed for the example. The main take-aways are:

  • Switch the view from “Current View” (which is a graphical calendar view) to “All Items” so we get the item-based list view.
  • Customize the web part properties to your design.
  • Edit the web part properties and limit the fields displayed in the view.
  • Specify the event date filter which reads: anything where the event starts within the next 5 days.
  • Note, that filter value is [Today]+5

Important – I did not include the full filter. A filter must also be added to ensure that “Start Date is greater than or equal to [Today]“, otherwise expired events will remain on the calendar forever. The final filter is actually: Starts on a date greater than or equal today and less than or equal to five days from today:

Sales team event filter.


You can see how much easier this view of events will be for visitors to read versus the clunky calendar view when there are multiple items (even just 2 or 3).

SharePoint Calendars Content Search Web Part – Event Date and Other Filters

Familiarize yourself with the following two posts if anything I write below isn’t clear:

Below, I’ll add a Content Search Web Part (CSWP) on the home page of the Intranet just as outlined in the previous posts called out above. The keys to know about these next steps are that:

  1. The Path search term will specify that the entire site collection should be searched, and it will filter down to just the Event content type.
  2. The web part on the home page is going to combine Event(s) from every site and filter to the new Category, “Corporate”.
  3. The “Start Date” field is actually a friendly name for the Site Column, “EventDate” . The search will filter to events starting within the next 10 days.
  4. The Search Schema has a predefined managed property, “EventDateOWSDATE“, which is Query enabled and holds EventDate values of list items.
  5. The Search Schema has a predefined managed property, “CategoryOWSCHCS“, which is Query enabled and holds Category values of list items.

When adding an calendar event item, users can specify a custom category. The CSWP will filter on that category and the Event Date. Specifically, it will filter for events tagged with the category, “Corporate”:

Now, add the CSWP to the home page of the Intranet. Here’s the query you specify in advanced mode.

Path:{SiteCollection.URL} AND ContentTypeId:0x0102* AND CategoryOWSCHCS:Corporate AND EventDateOWSDATE >={Today} AND EventDateOWSDATE <= {Today+10}

If anything above is unclear, go through the refiners post here.

I’ll limit the number of items to show at 10 and use the “Two lines” template. With that, I’ll set the “Line 2” property to map to “EventDateOWSDATE”.

Using the “Two Lines” template and setting properties for line 2 is covered here.

Business Management O365 and SharePoint CSWP settings.

Review the SharePoint Calendar Web Part and Content Search Web Part

Here’s the new Meet and Greet event on the Sales Division Page. This will show-up immediately:

Business Management Office 365 SharePoint sales division calendar.

After waiting for the Search crawl to complete, we see only the new Corporate event show up on the main Intranet home page.

Business Management O365 SharePoint Corporate Events.


This same method can be applied to training, meet-and-greets, company holidays, annual reviews, and so on.



Categories: Business, Business Management, Contract Lifecycle Management, Office 365 and O365, SharePoint

Tags: , , ,

Leave a Reply