August 2, 2017

SharePoint - Calendar Web Part with Color Code and Overlays

In this blog, I'll walkthrough in detail how we can configure SharePoint Calendar Web Part (in OOTB manners) that displays different color code for different category of events. In this example, "Category" is a choice column (having three choices - "Tasks", "Training" and "Current Events") defined in the Calendar List.

Once configured, calendar web part will look as shown in below screenshot. This will show different color for different category of events. For example, we took three different categories that are "Tasks", "Training" and "Current Events".


Now Let's check how we can achieve this.


Step 1: Create three different views for all categories.
1. Create a calendar view that will show events filtered by Category = "Current Events".

  • Navigate to Calendar List -> Select Create View (from Ribbon).

  • Select Calendar View.

  • Fill Information and Apply Filter. This view will hold all events filtered by Category = "Current Event".

2. Repeat above steps to create two more calendar views that will show events filtered by Category = "Tasks" and "Training".

3. Create one common calendar view "ALL". Don't Apply filter in this view.

Step 2. Now we will add Calendar Overlays in newly created "ALL" calendar view.
1. Define Calendar Overlay for different category specific views in "ALL" Calendar View we have created.
  • To add Calendar Overlay, Select Calendar > Open "ALL" Calendar View > Calendar Overlays (from Ribbon).

  • Click New Calendar.

  • Fill information and apply color code for your view > Press OK.


2. Repeat these steps for "Training" and "Tasks" to define Calendar Overlay for these categories too.

3. We have "ALL" Calendar View defined with overlay. Now, we can use this view on Calendar View Web Part.

4. To observe the results, let's add Calendar web part on SharePoint Page. And select "ALL" Calendar View from the web part properties. We will see the result as expected with different color codes on Calendar for different category of events.

So, this way we can configure Calendar web part to display different color code for different category of events with Calendar Overlay.
 
If you have any questions you can reach out our SharePoint Consulting team here.

No comments:

Post a Comment