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

[up-validate] on input[type=date] should run callback on blur event, not change event #336

Closed
triskweline opened this issue Dec 30, 2021 Discussed in #334 · 0 comments
Closed

Comments

@triskweline
Copy link
Contributor

Discussed in #334

Originally posted by sturatcliffe December 16, 2021
Hi all,

Has anyone else noticed some weird behaviour when using up-validate on a HTML date field? I've only checked in Chrome so far, but when you try to enter a date, it seems to trigger the validation request when entering the first character of the year part.

This means you end up not being able to complete the year part as when the validate request resolves and the form is re-rendered, the focus on the date field resets so you end up in an infinite loop of entering the day + month + first digit of the year.

Hopefully this GIF helps demonstrate it!

up-validate-date

Has anyone found a way of stopping this behaviour so we can have Unpoly trigger validation on date/datetime fields?

Cheers.

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

No branches or pull requests

1 participant