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 Commented Oct 24, 2018 at 13:05
  • $( "#noSunday" ).datepicker({ beforeShowDay: noSunday }); Commented Oct 24, 2018 at 13:05
  • function noSunday(date){ var day = date.getDay(); return [(day > 0), '']; }; Commented Oct 24, 2018 at 13:06
  • yeah! it works please post an answer
    – Hitesh
    Commented Oct 24, 2018 at 13:24

1 Answer 1

4
$( "#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 and acknowledge you have read our privacy policy.

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