Overlay a Sharepoint calendar on another Sharepoint calendar

The procedure given below describes how to overlay one SharePoint calendar onto another SharePoint calendar. After you overlay the calendar, you can use this calendar to create a special calendar view.

To overlay a SharePoint calendar with another SharePoint calendar, follow the steps given below.

How to set the user defined colors for calendar events instead of default colors

SharePoint only allows you to create, apply and color-code 10 calendar overlays. The colors are controlled by CSS classes ms-acal-color1 to ms-acal-color9.You can override to the style, as shown below, followed by adding the style into a content editor Web part in the calendar view.

CSS code

  1. <style type="text/css">
  2. .ms-acal-color1{
  3. background-color:lime !important;
  4. }
  5. </style>

If you're just using the Web part view of a calendar overlay, the style given above style override is great. If you're using it on the standard calendar view page, you'll also want to update the style, which is used by the key ('apanel') in the left nav, so the colors match.

CSS code to change left panel calendar colors

  1. <style type="text/css">
  2. .ms-acal-color1{
  3. background-color:#CC9933 !important;
  4. }
  5. </style><style type="text/css">
  6. .ms-acal-apanel-color1{
  7. background-color:#CC9933 !important;
  8. }

Note

#CC9933 can change the color code, as per your desire.

Through content editor Web part in a page, we can apply the new colors to calendar overlay event.

Add a content editor Web part in a page

  1. Click Gear icon on right hand side top and then click Edit page.


    Now, click Add a Web Part link.



  2. Now, you need to select “Content Editor” Web part under the category Media and Content. Click Add.



  3. Click here to add new content.



  4. Click Edit Source.


Add CSS code mentioned above in Edit Source page, followed by saving and closing the page.

Conclusion

In this article, I explained how to do a calender overlay and also to set the user defined color for the calender overlays.