Jquery Datepicker trigger after changing month (after month renders)

user278860 picture user278860 · Feb 22, 2010 · Viewed 15.2k times · Source

I want to highlight some days in the current month. I can do this on the first month, but not on a new month after "next month" or "prev month" is clicked. I tried using onChangeMonthYear event but this executes before the new (or prev) month renders.

any ideas?

Answer

Peter Bailey picture Peter Bailey · Feb 22, 2010

Probably your best choice is going to be the beforeShowDay callback.

http://jqueryui.com/demos/datepicker/#event-beforeShowDay

You can specify a new class name for the cell, based on whatever your date criteria is.