Monday 29 February 2016

Office 365 & SharePoint - Hide Weekends on Calendar View

A - OBJECTIVE: at Calendar view, you wish to hide weekends (i.e. Sats & Suns)

B - PROBLEMS :

To leverage on default SharePoint features, we need to customise the CSS style sheet.

C - SOLUTION:

1. Go to Site Settings to change the Regional Settings so that Mons are the first days in the calendar view.

2. Embed a Content Editor webpart into the page so that it can host the below CSS style.

D - SOURCE CODE:

<style type="text/css"> 
    table.ms-acal-month > tbody > tr > td:nth-of-type(6) > div { 
        background-color:#ebebeb;
        position:relative;
        z-index:999; 
    } 
     
    table.ms-acal-month > tbody > tr > td:nth-of-type(7) > div { 
        background-color:#ebebeb;
        position:relative;
        z-index:999;
    } 
</style>


2 comments:

  1. Hi do you know how to make an item's title in Sharepoint calendar to go left alignment?
    After making the weekend greyed out, I was thinking to make all titles go to the left corner as it doesn't look nice.

    ReplyDelete
  2. I have followed these instructions to the last piece, but cannot get my SP2016 calendar to eliminate Saturday and Sunday. Please assist!

    ReplyDelete