Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Style specific dates in jquery ui datepicker plugin

I'm writing an app for reserving training facilities, and I want to be able to let the instructor reserving a facility know when the facility is already reserved for a given date.

I'm using the jquery-UI datepicker plugin, and I want to be able to style the table cells for these reserved dates differently. I just can't figure out how to pass the dates into the plugin so I can change the class for those dates on the calendar.

like image 499
user113249 Avatar asked Jan 02 '26 06:01

user113249


1 Answers

I would make use of the beforeShowDay event to deal with this.

http://api.jqueryui.com/datepicker/#option-beforeShowDay

like image 78
ScottE Avatar answered Jan 06 '26 09:01

ScottE



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!