A frequent request from SharePoint users is to remove weekends from the calendar view.
Unfortunately, the proposed solution has several issues (see comments), so I decided to write my own.
My first step was to modify the calendar settings:
Site Actions | Site Settings | Site Administration | Regional Settings
I changed the “First day of week” to Monday. This way, Saturday and Sunday are pushed to the last two columns.
Add a CEWP to your page, under the calendar, and link it to the following script:
The script scrolls through the calendar and removes the columns for Saturday and Sunday. It works for both the month view and week view. I tested it in Internet Explorer 7 and Firefox.
Remember to adjust the value of the width (“CalendarWidth”). Set it to zero for automatic layout, for example if you combine the script with the “tiny calendar” style.
The script won’t work in week view if you include weekend events (for example a team picnic on Sunday from 11 am to 4 pm). It’ll work for multiple day events that include a weekend (for example vacations from December 22nd to January 2nd).
The live demo:
We now have a nice toolset to tweak the look of SharePoint calendars:
– remove weekends (this post)
– reduce the size
– add color coding
– add HTML, like hover effects
– include an expand/collapse button
Now, wouldn’t it be nice if we could display a same calendar across multiple sites? Well, let’s keep some for next year!