I am using a jquery ui datepicker. I want to add some validation so it only allows people to choose Saturdays instead of any date.
I could validate after the fact but thought it would be slicker to have the datepicker do the upfront validation by only enabling Saturday dates.
$("#test").datepicker(
{
beforeShowDay: function(date){
if(date.getDay() == 6){
return [true];
} else {
return [false];
}
}
}
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With