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
Validation fails when putting step="1" in a "datetime-local" input type #2023
Comments
Hi, Have same issue here. Is there any known workaround? Thanks. |
please provide a jsfiddle showing the problem, thx. |
Here is the example: https://jsfiddle.net/na6Lqpar/ To reproduce the problem, click in the first input then in the second and check console errors. Thanks. |
awesome, thx |
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. |
ran into this issue recently, and due to the exception thrown, another field won't validate anymore. As this is a very long lasting issue already, I have created a solution for my case : step="1" on a "time" input field using "hh:mm:ss" as format.
rest of the code omitted as it is not changed. I added the "time" to the supportedTypes, and I added code in the |
Subject of the issue
When I put step="1" in a datetime-local input field to show seconds, if I'm validating that field with the plugin (just "required", for example), I get a javascript error saying "Step attribute on input type datetime-local is not supported". If I put this step="1" in a field that is not being validated, it works without problems.
Your environment
Steps to reproduce
Just create a datetime-local input field with step="1", and try to validate it with required.
Expected behaviour
When you put step="1" in a datetime-local field, the field shows seconds (by default you can just see minutes because default value is step="60")
Actual behaviour
If the step="1" is in a field that is being validated with the plugin, you get a Javascript error with message "Step attribute on input type datetime-local is not supported".
The text was updated successfully, but these errors were encountered: