-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
showTimeSelect does not work when working with ranges. I noticed it in your demo but thought it was just acting a little iffy. I just realized though that it's a bug. I can click on one date (while in range mode) and then try and click on a time, and i get this error:
ncaught TypeError: Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a Symbol.iterator method.
at _nonIterableRest (nonIterableRest.js:2:1)
at _slicedToArray (slicedToArray.js:6:1)
at Object.handleDateRangeChange [as onChange] (calendar-date-picker.tsx:29:65)
at Object.eval [as onChange] (index.js:1:83471)
at n.eval [as handleClick] (index.js:1:46211)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
at invokeGuardedCallback (react-dom.development.js:4277:1)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
at executeDispatch (react-dom.development.js:9041:1)
To Reproduce
Steps to reproduce the behavior:
just have the showTimeSelect attribute set to true with selectsRange and you should be able to reproduce it.
Expected behavior
As stated, i get that error up above. I tried hooking it up with a single date one and it works just fine.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.