【发布时间】:2009-09-09 10:39:55
【问题描述】:
我不希望在我的 JQuery UI 日期选择器上显示“今天”突出显示。 gotoCurrent 选项旨在使突出显示移动到选定的日期。这样就好了。 但是将 gotoCurrent 设置为 true 无效。我做错了什么?
【问题讨论】:
标签: jquery jquery-ui datepicker
我不希望在我的 JQuery UI 日期选择器上显示“今天”突出显示。 gotoCurrent 选项旨在使突出显示移动到选定的日期。这样就好了。 但是将 gotoCurrent 设置为 true 无效。我做错了什么?
【问题讨论】:
标签: jquery jquery-ui datepicker
gotoCurrent 控制 ButtonPanel 中“今天”按钮的行为。
select a date != today's date, click this button:
if gotoCurrent = false -> today's date is shown
if gotoCurrent = true -> selected date is shown
禁用今天的突出显示: 在 ui.datepicker.js 文件中:
搜索:
(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
并删除高亮类(或删除整行):
(printDate.getTime() == today.getTime() ? '' : '') +
你应该得到你想要的。
【讨论】: