想要在日期选择器中禁用星期日

时间:2016-04-19 11:28:09

标签: javascript jquery-ui-datepicker

想要禁用星期日,

<input id="datepicker"> var picker = new Pikaday({ 
disableDayFn: function(date)
{ 
// Disable Monday return date.getDay() === 1; 
}, field: ...

1 个答案:

答案 0 :(得分:0)

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