且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在jQuery UI日历小部件中突出显示日期

更新时间:2022-10-20 18:02:37

HTML:

 < div id =datepicker>< / div> 
$ p>

jQuery

  $('#datepicker')。datepicker({
beforeShowDay:function(date){
if(date == myDate){
return [true,'css-class','ToolTip'];

}
}
});

您需要为 css-class 。有关详情,请点击此处


I have a jQuery UI calendar widget that's displayed in my web application. I'd like to be able to highlight a specific day of the month when the user performs an action. Is there any way to do this?

HTML :

<div id="datepicker"></div>

jQuery :

$('#datepicker').datepicker({
            beforeShowDay: function(date) {
             if (date == myDate) {
              return [true, 'css-class', 'ToolTip'];

              }
           }
});

You need to write a CSS class for css-class. For more information Click Here