11

So basicly how do I add a css class? I've given this a go but it ain't working:

<DatePicker 
       className="form-control 
       dateInput" 
       selected={startDate}  
       onChange={function(date){
                    startDate = date;
                 }
       }
/>

Thanks, Ed. (It's been compiled with webpack by the way.)

Mayank Shukla
  • 100,735
  • 18
  • 158
  • 142
Ed Lynch
  • 615
  • 4
  • 10
  • 28

1 Answers1

12

Depending on where you want to add the css class, you can either use className prop or popperClassName. For more, please read the docs: https://github.com/Hacker0x01/react-datepicker/blob/master/docs/datepicker.md

Kris Selbekk
  • 7,438
  • 7
  • 46
  • 73