jQuery UI Datepicker:
Hi,
I'm trying to have the pop-up calendar allow only the Monday dates in the future to be selected. I've tried this code:
$(function() {
$('#dateWeekly').datepicker({
showOn: 'both', // use to enable calendar button and focus
buttonImage: 'childtime/images/calendar.gif',
buttonImageOnly: true,
buttonText: 'Show Calendar',
numberOfMonths: 3,
showButtonPanel: true,
minDate: -0, maxDate: '+12M',
// beforeShowDay: function(date){ return [date.getDay() == 1,""]}
beforeShowDay: function(date) { return [date.getDay() == 1, "" && date.getTime() != today.getTime(), ""]; }
});
});
This disables all past dates, and disables all future days except Mondays (so far so good), but it fails to disable today's date if today is Monday. Any suggestions will be appreciated. Thanks!