Is there a way to disable the input on DayPickerInput? I have a scenario where I have to chose a begin and start date and sometimes the start date is fixed and should not be changed. I would like to see the option to not be able to change the input but show the calendar.
Have you tried to set it to readOnly? It should work!
Not sure if I'm missing something here, I'm passing a readOnly prop set to true but nothing seems to happen to the input?
<DayPickerInput
...
readOnly={true}
/>
Where am I going wrong?
@tomalexhughes:
<DayPickerInput inputProps={{ readOnly: true }} />
I'm still able to interact with the date picker if a I click on the field with readOnly: true.
__EDIT:__ I used disabled: true, which works as you would expect.
To be clear: disabled will prevent from opening the overlay, readOnly will just make the input field read-only (but the overlay will open):
Most helpful comment
To be clear:
disabledwill prevent from opening the overlay,readOnlywill just make the input field read-only (but the overlay will open):https://codesandbox.io/s/7yymmyokoj