【发布时间】:2011-05-25 07:10:44
【问题描述】:
是否可以更改 jquery 日历中周末日期的字体颜色?我尝试使用 ui-datepicker-week-end 类,但它只会更改 Sun 和 Sat 的字体颜色。我想要的也是改变落在太阳和坐下的日子的颜色。
【问题讨论】:
标签: jquery html css jquery-ui jquery-ui-datepicker
是否可以更改 jquery 日历中周末日期的字体颜色?我尝试使用 ui-datepicker-week-end 类,但它只会更改 Sun 和 Sat 的字体颜色。我想要的也是改变落在太阳和坐下的日子的颜色。
【问题讨论】:
标签: jquery html css jquery-ui jquery-ui-datepicker
您需要在选择器中更具体一点,因为ui-datepicker-week-end 在<td> 上,但有一个<a> 内部有ui-state-default,如下所示:
.ui-datepicker-week-end, .ui-datepicker-week-end a.ui-state-default {color:red;}
You can test it here。如果你好奇的话,day cell 的标记是这样的:
<td class="ui-datepicker-week-end">
<a class="ui-state-default" href="#">DAY NUMBER</a>
</td>
【讨论】: