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

Browser min/max validation for dates and datetimes #716

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

BryceStevenWilley
Copy link
Contributor

Prevents people from selecting wrong date inputs in the first place.

According to https://caniuse.com/input-datetime, works on all browsers except Safari on iOS, but I've confirmed that adding the attributes doesn't change the behavior on iOS, as we still have the necessary JS validation. Also tested on Firefox desktop and mobile.

Prevents people from selecting wrong date inputs in the first place.

According to https://caniuse.com/input-datetime, workes on all browsers except
Safari on iOS, but I've confirmed that adding the attributes doesn't change the
behavior at all.
Simple changes, just needed to handle the different formatting functions.
@jhpyle jhpyle merged commit cf15491 into jhpyle:master Dec 1, 2023
3 checks passed
@jhpyle
Copy link
Owner

jhpyle commented Dec 2, 2023

Thanks, I didn't think that feature was compatible with the jQuery Validation Plugin but I was able to make some changes to the validation configuration to make it work (it seems to work, at least). It definitely makes the calendar widget more usable.

@BryceStevenWilley BryceStevenWilley deleted the min_date branch December 4, 2023 14:50
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