Highlight dates in jquery UI datepicker

前端 未结 6 1988
暖寄归人
暖寄归人 2020-12-08 03:04

How i can use beforeShowDay for highlighting days in jQuery UI datepicker. I have the following date array

Array
(
    [0] => 2011-07-07
         


        
6条回答
  •  既然无缘
    2020-12-08 03:39

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

    You compare the date parameter in the beforeShowDay with the dates you have got in your array, and if there is a match you return an array as defined in the link above.

    In the array you return from beforeShowDay, the second element is used to set the class name which will be used on the date, you can then use css to set styles for that class.

提交回复
热议问题