Search code examples
reactjsreact-day-picker

React Day Picker, avoid adding modifier styles for outside days of month


I'm using react-day-picker and in here the custom modifier styles are added to outside days of month.

How can I avoid adding those styles to dates which is disabled and outside of the month?


Solution

  • You can restrict your CSS selector with :not('.DayPicker-Day--outside'), for example:

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