Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Fix 'step', 'min' & 'max' controls on date/time inputs#2119
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
staabm commentedDec 14, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
A good first step would be to answer all the questions inside the PR description. Atm this code changes are useless. |
Done, i hope that is ok for you ;). |
This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. |
derkaiserreich commentedJun 14, 2018
Could this be reopened again as it is basically solved? |
Sorry for this. I'll reopen it and will try to review it when I got some free time. |
khansamad47 commentedOct 20, 2018
Can this please be fixed |
staabm commentedOct 21, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@khansamad47 what exact problem do you see and does this fix provided here solve it? |
Tomanlu commentedDec 4, 2019
In what state is this issue? Can it be fixed? |
jameswilson commentedFeb 23, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm seeing that this desperately needs tests to move forward. Sadly, tests were never added to this PR, per requested checklist in PR summary:
When I went to test this using Drupal's Clientside Validation module viapatch adapted from the code in this pr, I immediately hit an issue where a date field should clearly pass, but fails. Relevant HTML snippet from Drupal, that could be adapted/simplified into a test case: Min/Max is not calculated correctly:<inputtype="date"placeholder="YYYY-MM-DD"min="1902-01-01"max="2037-12-31"name="date"value="2022-02-22"size="12"/><inputtype="time"step="1"placeholder="hh:mm:ss"name="time"value="09:14:19"size="12"/> I've setup a very complete jsbin to compare native html5 validation with each date type that demonstrates several issues related to min/max calculations and breakage due to the "step" attribute. |
omahane commentedMar 14, 2024
It's been a couple years,@ElGigi . Have you had a chance to revisit this? |
I tried to fix it, but unfortunately I no longer use the library since I no longer use jQuery. |
Uh oh!
There was an error while loading.Please reload this page.
Checklist for this pull request
Before submitting a pull request, please make sure to follow these rules:
Description
In reference to issue:#2023
It's a solution for jquery-validation to support attributes: 'step', 'min' and 'max' on inputs of type : 'time', 'date', 'datetime', 'datetime-local', 'month' and 'week'.
It respond to:
jquery-validation/src/core.js
Line 1463 in6ff4a02
Specifications:https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type%3Ddatetime-local)