Disable all Sundays in jQuery UI Calendar

前端 未结 3 552
借酒劲吻你
借酒劲吻你 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:45

    you can also use this code it is working for me

    $("#date").datepicker({
    filter: function(date, view) {
    if (date.getDay() === 0 && view === 'day') {
      return false; // Disable all Sundays, but still leave months/years, whose first day is a Sunday, enabled.
    }
    }
    });
    

提交回复
热议问题