You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a value such as 12/01/20aa is entered, setValueFromInput is called and the input value is passed to moment which will create a date. This can leave a date input with a irrelevant date based off garbage input.
I have modified setValueFromInput locally to include the following:
if(!!this.props.error) {
return;
}
which prevents an invalid date being set on invalid input - this only kicks in if an error is supplied to the component.
If this behavior makes sense to you, it would be great if something like the above could be addedn (or a valdation function passed in as a prop to check for invalid input).
The text was updated successfully, but these errors were encountered:
When a value such as 12/01/20aa is entered, setValueFromInput is called and the input value is passed to moment which will create a date. This can leave a date input with a irrelevant date based off garbage input.
I have modified setValueFromInput locally to include the following:
if(!!this.props.error) {
return;
}
which prevents an invalid date being set on invalid input - this only kicks in if an error is supplied to the component.
If this behavior makes sense to you, it would be great if something like the above could be addedn (or a valdation function passed in as a prop to check for invalid input).
The text was updated successfully, but these errors were encountered: