Jquery datepicker: highlight 'today' when clicked?

夙愿已清 提交于 2019-12-12 04:38:25

问题


I have a jquery datepicker on the site, the calendar is always visible. My problem is I cannot seem to select 'today'. Well, I can, but it doesn't change its highlight as the other days do, it always keeps its 'today-look' and this is pretty confusing.

  1. Is there some built-in way how to highlight today when selected (as the other elements are)? <- preferred
  2. Is there a way to easily hide today's highlight with js?

Thank you!


回答1:


You can override the jquery ui css.Try this jsfiddle

/*selected date */
.ui-state-active{
 color:red !important;
}
/*todays date*/
.ui-state-highlight{
   border:none !important;    
} 


来源:https://stackoverflow.com/questions/17508545/jquery-datepicker-highlight-today-when-clicked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!