Is it possible to change the default width of input field of DayPickerInput? If yes, then how can I achieve it? I am not sure if we can do this with overlayComponent.
Asked
Active
Viewed 5,510 times
2 Answers
10
You can use inputProps
to add your props such as style to the input
field. See docs: http://react-day-picker.js.org/api/DayPickerInput#inputProps
For example:
<DayPickerInput inputProps={{ style: { width: 200 } }} />

gpbl
- 4,721
- 5
- 31
- 45
0
You can do it by writing your own styles, but first check the stylesheets of day picker here - react-day-picker/lib/style.css and then modify accordingly.

nasaa
- 2,701
- 8
- 47
- 76
-
I can for sure write my own custom style. but is there a way to pass that custom style as props to the DayPickerInput component? Or are you suggesting to override the whole style.css with a new css file? – aman Dec 24 '17 at 23:18