Calendar Webpart showing weekend

%3CLINGO-SUB%20id%3D%22lingo-sub-1554566%22%20slang%3D%22en-US%22%3ECalendar%20Webpart%20showing%20weekend%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1554566%22%20slang%3D%22en-US%22%3E%3CP%3ESo%20I%20have%20modified%20the%20content%20page%20of%20the%20calendar%20to%20remove%20the%20weekend%20days%20so%20that%20it%20will%20only%20show%20the%20work%20week%20using%20a%20source%20code%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3CSTYLE%20type%3D%22text%2Fcss%22%3ETABLE.ms-acal-month%20TR%20TH%3Afirst-child%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20TABLE.ms-acal-month%20TR%20TH%3Afirst-child%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%2B%20TH%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20TABLE.ms-acal-month%20TR%20TH%3Afirst-child%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20TABLE.ms-acal-month%20TR%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20DIV%20%7B%20WIDTH%3A%201px%3B%20DISPLAY%3A%20none%20!important%20%7D%20TABLE.ms-acal-month%20TR%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%7B%20WIDTH%3A%200.5%25%20%7D%20TABLE.ms-acal-month%20TR%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20TABLE.ms-acal-detail%20TR%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%7B%20WIDTH%3A%200.5%25%20!important%20%7D%20TABLE.ms-acal-detail%20TR%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20DIV%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20TABLE.ms-acal-detail%20TR%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%2B%20TD%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20.ms-acal-month-top%20SPAN%20%7B%20DISPLAY%3A%20inline%20!important%20%7D%20.ms-acal-month-top%20SPAN%20%2B%20SPAN%20%7B%20DISPLAY%3A%20none%20!important%20%7D%20.ms-acal-week-top%20TD%20DIV%20SPAN%20%7B%20DISPLAY%3A%20inline%20!important%20%7D%20.ms-acal-week-top%20TD%20DIV%20SPAN%20%2B%20SPAN%20%7B%20DISPLAY%3A%20none%20!important%20%7D%3C%2FSTYLE%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%20when%20using%20the%20webpart%20of%20that%20calendar%20on%20other%20pages%20within%20the%20site%2C%20the%20full%20week%20still%20shows.%20Is%20there%20a%20way%20I%20can%20have%20the%20webpart%20also%20not%20show%20the%20weekend%20days%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1554566%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1554570%22%20slang%3D%22en-US%22%3ERe%3A%20Calendar%20Webpart%20showing%20weekend%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1554570%22%20slang%3D%22en-US%22%3EThat%20code%20snippet%20only%20applies%20to%20the%20page%20it%20on%20as%20it%20modifies%20the%20DOM%20on%20render.%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20would%20need%20to%20add%20the%20snippet%20to%20every%20page%20where%20you%20display%20the%20calendar%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

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
Highlighted
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