[英]Change the font color of weekend dates in jquery datepicker
Is it possible to change the font color of dates that fall on the weekends in jquery calendar? 是否可以在jquery日历中更改周末日期的字体颜色? I try to use the class ui-datepicker-week-end but it only change the font color of Sun and Sat. 我尝试使用类ui-datepicker-week-end,但它只改变了Sun和Sat的字体颜色。 What I want is to also change the color of days that falls on sun and sat. 我想要的是改变落在太阳和坐着的日子的颜色。
You need a bit more specificity in your selector, since ui-datepicker-week-end
is on the <td>
, but there's an <a>
with ui-state-default
inside, like this: 你的选择器需要更多的特异性,因为ui-datepicker-week-end
在<td>
,但是内部有一个带有ui-state-default
的<a>
,如下所示:
.ui-datepicker-week-end, .ui-datepicker-week-end a.ui-state-default {color:red;}
You can test it here . 你可以在这里测试一下 。 If you're curious, the markup for day cell is like this: 如果你很好奇,日间单元格的标记是这样的:
<td class="ui-datepicker-week-end">
<a class="ui-state-default" href="#">DAY NUMBER</a>
</td>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.