Calendar Webpart showing weekend

Copper Contributor

So I have modified the content page of the calendar to remove the weekend days so that it will only show the work week using a source code

 

<style type="text/css">TABLE.ms-acal-month TR TH:first-child + TH + TH + TH + TH + TH + TH { DISPLAY: none !important } TABLE.ms-acal-month TR TH:first-child + TH + TH + TH + TH + TH + TH + TH { DISPLAY: none !important } TABLE.ms-acal-month TR TH:first-child { DISPLAY: none !important } TABLE.ms-acal-month TR TD + TD + TD + TD + TD + TD DIV { WIDTH: 1px; DISPLAY: none !important } TABLE.ms-acal-month TR TD + TD + TD + TD + TD + TD { WIDTH: 0.5% } TABLE.ms-acal-month TR TD + TD + TD + TD + TD + TD + TD { DISPLAY: none !important } TABLE.ms-acal-detail TR TD + TD + TD + TD + TD + TD { WIDTH: 0.5% !important } TABLE.ms-acal-detail TR TD + TD + TD + TD + TD + TD DIV { DISPLAY: none !important } TABLE.ms-acal-detail TR TD + TD + TD + TD + TD + TD + TD { DISPLAY: none !important } .ms-acal-month-top SPAN { DISPLAY: inline !important } .ms-acal-month-top SPAN + SPAN { DISPLAY: none !important } .ms-acal-week-top TD DIV SPAN { DISPLAY: inline !important } .ms-acal-week-top TD DIV SPAN + SPAN { DISPLAY: none !important }</style>

 

However when using the webpart of that calendar on other pages within the site, the full week still shows. Is there a way I can have the webpart also not show the weekend days?

1 Reply
That code snippet only applies to the page it on as it modifies the DOM on render.

You would need to add the snippet to every page where you display the calendar