0

I would like to change the background color of the day picker but I can't seem to find a way. Here is my code:

.DayPicker-wraper {
  background-color: black;
}
<DayPickerInput 
        placeholder={"Date..."} 
        onDayChange={day => setNewDate(day)}
/>

And here is the DOM structure for the day picker

enter image description here

kid
  • 771
  • 1
  • 4
  • 12

1 Answers1

1

In your example the class you're targetting is 'DayPicker-wraper' while the DOM seems to have the classname as 'DayPicker-wrapper'. Alternatively, could you not also add a className like so then target that?

<DayPickerInput 
    className='date-picker'
    placeholder={"Date..."} 
    onDayChange={day => setNewDate(day)}
/>
Kahzpa
  • 11
  • 3