Disable all Sundays in jQuery UI Calendar

前端 未结 3 548
借酒劲吻你
借酒劲吻你 2020-12-01 10:45

I want to disable Sundays in jQuery UI calendar.

From docs I came to know about this:--

$(\'#datepicker\').datepicker({ minDate: 4,beforeShowDay: $.d         


        
3条回答
  •  天命终不由人
    2020-12-01 11:39

    Yes you can disable Saturday and Sunday, In jQuery UI datepicker.

    https://codepen.io/VijayDhanvai/pen/ExjdGPb

    $("#date").datepicker({
        beforeShowDay: function(date) {
            var day = date.getDay();
            return [(day != 0 && day != 6),  ''];
        }
    });
    

提交回复
热议问题