How do I restrict multiple DatePickers to certain days?
I have a form with lots of different date fields, and the datepicker is working perfect, however some of the fields need to be restricted by certain days.
i.e. one can only select mondays, the other can only select saturdays/sundays and the other can only select saturdays.
is it possible this can be done on one form?
I understand how to restrict the days, have done it so only mondays can be selected but dont know how to customise so individual date fields you can only select other days.
Help would be much appreciated
EDIT :
I am using Drupal and Webform, with JqueryUI Datepicker. Ive used this code successfully to restrict selections to monday, however that is obviously acros开发者_C百科s the whole form and I have other date fields that I want to make other kinds of restrictions on.
onlyMon: function(date) {
if (date.getDay(1) == 1) {
return [true, ''];
} else {
return [false, ''];
}
},
Thanks guys!
Is this something like you're looking for?
jquery datepicker - beforeShowDay problem
精彩评论