TimePicker validation, access to previous value in change event
Is there a way to get the previous value of a TimePicker in a change event?
The event object for TimePicker has a field called prevValue but it's equal to the currently selected value.
We'd like to validate the time a user inputs through the TimePicker with a custom validation method.
It seems that Input provides such an option with liveChange, but TimePicker extends MaskedInput, which extends InputBase, which does not have the liveChange event.
Hi @alex-ecenta,
thanks for the reported issue! I've created a internal ticket (1780198878) and dispatched it to the responsible colleagues.
You can check its status on GitHub.
Regards, Clemens
@alex-ecenta what exactly you to validate? If you could elaborate a bit more on your use case that would be helpful for us to understand better your requirement.
@vladimir-velinov We want value that the user selects to be assigned, only if the case if it is valid, based on our validation logic, implemented in our validation method, e.g. that the time falls in between a range of other times. If it fails, we would like to keep the previous value in the control.
Hello @alex-ecenta , Thank you for share your findings. I've created an becklog item. The status of the issue will be updated here in GitHub. Regards,
Hi,
You can try using the following code: http://jsbin.com/nawunesite/edit?html,output
Best, Teo