views:

144

answers:

1

Given an inline JQuery UI datepicker, I want to change the background colors of individual dates. So I want to be able to set "October 5th, 2009" to green and "11/6/209" to red. How could I do this in JQuery and as the datepicker is scrolled month to month what event would I catch to update the background colors of individual dates?

+1  A: 
$('#date2').DatePicker({
    flat: true,
    date: ['2008-07-31', '2008-07-28'],
    current: '2008-07-31',
    format: 'Y-m-d',
    calendars: 1,
    mode: 'multiple',
    onRender: function(date) {
     return {
      disabled: (date.valueOf() < now.valueOf()),
      className: date.valueOf() == now2.valueOf() ? 'datepickerSpecial' : false
     }
    },
    starts: 0
});

http://www.eyecon.ro/datepicker/

jmav