react-datepicker
react-datepicker copied to clipboard
Updating showTimeSelect dynamically doesn't render the time select dropdown
Describe the bug
Setting showTimeSelect
to true dynamically when initialized with showTimeSelect = false
in the inline version doesn't render the time picker but you can toggle the time select on and off if you initially set it to true.
To Reproduce Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/hardcore-williams-1vp2di?file=/src/App.js
- Click on Toggle Time Picker button
- Observe that the time select dropdown is not rendered
Expected behavior
I expect you would be able to toggle it on when initialized from showTimeSelect = false
@martijnrusschen
Can you confirm this behavior so that we can fix it? Can showTimeSelect = false
be a valid usage of the property ?
It should be nice if we could have this fixed.