1

I want to disable/remove Sunday from js calendar and its related dates also.

Can somebody tell me how can I achieve this?

I search from google but all says to hide weekend, I just want to hide only Sunday and its related dates.

enter image description here

Thanks in advanced.

4
  • jsfiddle.net/zXFGN Oct 24, 2018 at 13:05
  • $( "#noSunday" ).datepicker({ beforeShowDay: noSunday }); Oct 24, 2018 at 13:05
  • function noSunday(date){ var day = date.getDay(); return [(day > 0), '']; }; Oct 24, 2018 at 13:06
  • yeah! it works please post an answer
    – Hitesh
    Oct 24, 2018 at 13:24

1 Answer 1

3
$( "#noSunday" ).datepicker({ 
        beforeShowDay: noSunday
});

function noSunday(date){ 
     var day = date.getDay(); 
     return [(day > 0), '']; 
}; 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.