开发者

How could I change the color of individual dates in a Jquery UI calendar widget?

Given an inline JQuery UI datepicker, I want to change the back开发者_高级运维ground 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?


$('#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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜