Here is the simple way to disable custom holidays in a JQuery UI calendar. Here for example I took may 1, 2, and 3 to disable.
The trick lies in the beforeShowDay event. This event will be triggered before showing each day on calendar. It returns an array of 3 elements.
- true or false : false to disabled date.
- CSS class : A css class to style a particular day
- Tooltip Text : To show the description for a day.
The defaultDate option which I used, just to make sure this code always shows the May, 2012, else the datepicker will show the current month.
Hope you find it helpful.