1

I'm trying to create a leave calendar excluding the weekends based on start time and end time.

enter image description here

I'm experiencing some sort of bug when I apply the codes below.

This code is too hide the weekends in the calendar

  <style type="text/css">
table.ms-acal-month > tbody > tr > th:nth-of-type(1){
    display:none;
}
table.ms-acal-month > tbody > tr > th:nth-of-type(7){
    display:none;
}
table.ms-acal-month > tbody > tr > th:nth-of-type(8){
    display:none;
}
table.ms-acal-month > tbody > tr > td:nth-of-type(7){
    display:none;
}
table.ms-acal-month > tbody > tr.ms-acal-summary-itemrow > td:nth-of-type(6){
    display:none;
}
table.ms-acal-month > tbody > tr.ms-acal-summary-dayrow > td:nth-of-type(6) > div{
    display:none;
}
table.ms-acal-month > tbody > tr.ms-acal-summary-dayrow > td:nth-of-type(6){
    border-top-width:0px;
    border-right-width:0px;
}
</style>

Without this code, the add button under Friday does not appear.

</style><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><br/><br/>​​​​​<br/>

Here is the image of the calendar I created.enter image description here

When I try to set the start time(Monday) and end time(Friday) it works fine but if I try to set the start time(Monday) and end time(Monday) doesn't appear very well (Vacation Leave 2) the same as Vacation Leave 6 which is Friday to Monday.

2
  • Can you explain in detail what are you trying to do in the calendar? Commented Jun 7, 2017 at 6:11
  • The calendar is for tracking/requesting vacation leave, as you can see in the image. Vacation leave 2 blue line's is incomplete, the blue line must cover Monday to Monday or 5 to 12 same with Vacation 6 friday to monday, unlike in monday to friday the blue line is complete.
    – Vista
    Commented Jun 7, 2017 at 8:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.