【问题标题】:Change the font color of weekend dates in jquery datepicker在 jquery datepicker 中更改周末日期的字体颜色
【发布时间】:2011-05-25 07:10:44
【问题描述】:

是否可以更改 jquery 日历中周末日期的字体颜色?我尝试使用 ui-datepicker-week-end 类,但它只会更改 Sun 和 Sat 的字体颜色。我想要的也是改变落在太阳和坐下的日子的颜色。

【问题讨论】:

    标签: jquery html css jquery-ui jquery-ui-datepicker


    【解决方案1】:

    您需要在选择器中更具体一点,因为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>
    

    【讨论】:

      猜你喜欢
      • 2011-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多