Disabling one date in Datepicker
I have a datepicker field which is currently set to only allow the selection of Fridays. I've been asked to also disable Friday 28 August - how would I amend the code to do this? Current code as follows:
$(function(){
$('#Date').datepicker({
beforeShowDay: nonWorkingDates,
changeMonth: true,
changeYear: true,
dateFormat: 'dd M yy',
onClose: closeDatePicker_Date
});
function nonWorkingDates(date){
var day = date.getDay(), Sunday = 0, Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6;
var closedDays = [[Sunday],[Monday],[Tuesday],[Wednesday],[Thursday],[Saturday]];
for (var i = 0; i < closedDays.length; i++) {
if (day == closedDays[i][0]) {
return [false];
}
}
return [true];
}
});