Skip to content

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

Description

@triskweline

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions