jQuery UI Datepicker:
Hello,
I am trying to have a pop-up calendar that allows me to select only Monday dates in the future. I 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 Monday (so far so good), but today it is not possible to disable today's date if today is Monday. Any suggestions would be appreciated. Thanks!
source share