React Day Picker,避免为月外的几天添加修饰符样式

时间:2018-04-17 11:57:26

标签: reactjs react-day-picker

我使用react-day-picker并在此处将自定义修饰符样式添加到月外的几天。

如何避免将这些样式添加到已禁用且在月外的日期?

1 个答案:

答案 0 :(得分:1)

您可以使用:not('.DayPicker-Day--outside')限制CSS选择器,例如:

.DayPicker-Day.DayPicker-Day--thursdays:not('.DayPicker-Day--outside') {
  background: yellow;
}