I am using a jQuery UI Datepicker, such that only Sunday can be selected.
What I would like to happen is have it where no dates from the current date into the future can be selected. Here is the code I am using currently:
var daysToDisable = [1,2,3,4,5,6];
$('#startdate').datepicker({
beforeShowDay: disableSpecificWeekDays
});
function disableSpecificWeekDays(date) {
var day = date.getDay();
for (i = 0; i < daysToDisable.length; i++) {
if ($.inArray(day, daysToDisable) != -1) {
return [false];
}
}
return [true];
}