Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-datepicker): fix the value validation #1465

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

ilhan007
Copy link
Member

Background
If there is value in the input field and the user removes that value,
the component sets "value-state=error" and fires "change" and "input" events with "valid: false" and this is not correct - empty input field should be a valid state.

Note: there is a method, called "isValid", but I did not add the check for empty value in that method by purpose, because it is used in a lot of places, where (if valid) the value is parsed or formatted and would throw errors on empty string, and I would need to make more changes to handle that. So this "isValid" is more like is the value valid for the given format.

If there is value in the input field and the user removes that vlaue,
the component sets "value-state=error" and fires "change" and "input" events with "valid: false" and this is not correct - empty input field should be a valid state.
@ilhan007 ilhan007 merged commit 14fe357 into master Apr 13, 2020
@ilhan007 ilhan007 deleted the fix-datepicker-validation branch April 13, 2020 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants