From widget's perspective, the change
. Once an invalid value is entered, the widget value becomes null
. If another invalid text is typed, the value is still null
event won't raise (there is no change). That being said, the widget's change behavior is intended and cannot be classified as bug.
The best way to handle such invalid text is to use a regular UI Validator, like Kendo UI Validator. It will notify the user that the value is not valid and if message is clear enough why it's not valid. This behavior is visible in the DateTimePicker how-to demo:
No matter how many times an invalid value is typed, the validation message will stay until a valid is typed. I believe this is the best way to notify the user for the form requirements without overriding his/her input.
If you would like to implement jQuery's "constrain input" functionality, then you can easily wire all inputs on the page and reset their value once an invalid value is typed. I must admit that validator is still required in this case:
We will consider this approach whether we decide to schedule the UserVoice suggestion for further research. For now I would suggest you use either the approach given in the last Dojo demo or using a proper client side validation.
Telerik by Progress