Closed gizmodesbois closed 5 years ago
Hi @gizmodesbois Thanks for reporting this issue.
The problem was the shortcut property which was just able to recognize moment.js objects.
But now, in v2.1.1, I added a new ability to this property to recognize both moment.js objects and option objects which can contain a callback property with a callback function.
Clearing date picker was able to cause the moment object to be empty, which can also cause date time picker not being able to select a new date.
Now in imrc-datetime-picker.js.org example, clearing date picker will just cause the cleared
flag to be false. (not the moment state to be empty !)
However, despite clearing date picker, moment object is exist in the state. Therefore, it's your own responsibility to handle a logic which can prevent passing moment object when date picker is cleared.
If there was another issue, your next contributions are appreciated.
Describe the bug When the input is clear, like in the example, we can't reselect a new one and make the update. No errors triggered in the console.
To Reproduce Steps to reproduce the behavior:
input
clear
optionExpected behavior It should select the date and fill the input correctly.
Screenshots Small video of the example. https://take.ms/Fqgan
Please complete the following information