I need to limit the jquery ui date picker to only have future Tuesdays and Thursdays as selectable days.
How can I accomplish this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Provide an onSelect handler to the datepicker and have your handler validate that the dates fit your defined criteria. I’m not sure where the onSelect fires so you may have ‘undo’ the selection if you can’t stop the event and alert the user.
One way of doing this would be to develop a custom date validator class that takes parameters and then call that date validator from the onSelect function. The onSelect function could take care of interacting with the datepicker itself to keep the design clean.
From http://docs.jquery.com/UI/Datepicker/datepicker#options
To change the display and selectability of a particular date or set of days use a beforeShowDay handler and have it change the selectability and CSS for the date in question.