0

我尝试setDate了功能,它添加ui-state-active了提到的日期,这很好。

我已经写了课程来ui-state-active制作高光显示。

但当前日期也显示为突出显示ui-state-hightlight。我想删除为当前日期添加的此类。

我猜这个突出显示是通过日期选择器函数的默认属性发生的。

但它没有,写成这样:

$(".datepickerfuture").datepicker({
    changeMonth: true,
    changeYear: true,
    showOn: "both",
    buttonImage: "../images/blank.gif",
    buttonImageOnly: true,
    minDate: new Date(),
});
4

2 回答 2

3

通过用下面的覆盖默认的 css.ui-datepicker-todaya.ui-state-highlightof。

.ui-datepicker-today a.ui-state-highlight {
    border-color: #d3d3d3;
    background: #e6e6e6 url(/themeroller/images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
    color: #555555;    
}

看看这个JSFiddle

于 2013-07-26T14:05:39.523 回答
0

我通过非常简单的方式解决了这个问题:我刚刚从 jquery.ui.css 中删除了 ui-state-highlight 类的所有 css 规则。通过仅向 ui-state-highlight 类添加一个 css 规则,当前日期以黑色边框突出显示(类似于 Windows 7 中的日期选择):

.ui-state-highlight {
    border-color: black !important;
}

但我在我的项目中只使用了一个日期选择器 ui 小部件。

于 2017-05-05T10:06:23.653 回答