-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
I have
<input data-dojo-type="dijit/form/NumberTextBox" data-dojo-props="constraints:{min:0,max:20,places:0}, intermediateChanges:true, trim:true"/>and check in the code
numberTextBox.on("change", () => {
okButton.set("disabled", numberTextBox.isValid());
});This does not work when user enters a number with spaces, e.g. " 12 ". The checkbox show no error, but numberTextBox.isValid() returns false. I.e. if isValid() checks text value, it should do filter first.
Update: Workaround is to call NumberTextBox._setBlurValue() on change:
numberTextBox.on("change", () => {
numberTextBox._setBlurValue();
okButton.set("disabled", numberTextBox.isValid());
});Metadata
Metadata
Assignees
Labels
No labels