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

pat-validation: Do not trigger on empty dates. Fixes: #711 #717

Merged
merged 5 commits into from Jul 22, 2020
Merged

Conversation

thet
Copy link
Member

@thet thet commented May 13, 2020

Fixed by checking if input.validity.badInput is true for date/datetime-local fields. If so, check the date, if not, it might have been empty.
Due to the ValidityState object only being updated after user input and not on programmatic input it cannot be tested.
See the discussion here: https://twitter.com/thetetet/status/1285239806205755393
and here: https://stackoverflow.com/questions/53226031/html-input-validity-not-checked-when-value-is-changed-by-javascript

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.

None yet

2 participants