是否可以更改 jquery 日历中属于周末的日期的字体颜色?我尝试使用 ui-datepicker-week-end 类,但它只会更改 Sun 和 Sat 的字体颜色。我想要的是也改变落在 sun 和 sat 上的日子的颜色。
最佳答案
您的选择器需要更具体一些,因为 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>
关于jquery - 在 jquery datepicker 中更改周末日期的字体颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4439811/