Reputation: 9
i want to disable a specific date from a specific month of every year in datepicker from Jquery Ui. for example: disable auguest(month) 15(date) of every year in datetime picker
Upvotes: 0
Views: 1416
Reputation: 780724
Use the beforeShowDay
option.
$("selector").datepicker({
...
beforeShowDay: function(date) {
var month = date.getMonth()+1; // +1 because JS months start at 0
var day = date.getDate();
return [!(month == 8 && day == 15), ""];
}
});
Upvotes: 4