Is there any (easy) way to set the jQuery UI Datepicker to disallow selection of specific, predetermined days?
I was able to get this approach working, however, it p
var unavailableDates = ["19-8-2014","14-9-2014"];
function unavailable(date) {
dmy = date.getDate() + "-" + (date.getMonth()+1) + "-" +date.getFullYear();
if ($.inArray(dmy, unavailableDates) < 0) {
return [true,"","Book Now"];
} else {
return [false,"","Booked Out"];
}
}
$('#iDate').datepicker({ beforeShowDay: unavailable });
Live Demo: http://jsfiddle.net/vfod0krm/