-
Notifications
You must be signed in to change notification settings - Fork 137
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
Conflicts with form validation in IE 11 #53
Comments
Hm, the value property matches the spec. Is it possible that IE's validation doesn't respect programmatic values, only user-typed values? |
@brianblakely It seems like IE’s constraint validation doesn’t care if you set the |
The polyfill sets both the attribute and the property. The property is populated with an ISO date, in accordance with the spec. Does IE expect to see the localized value, which is given to the attribute? If that is the case, then it is an IE bug. |
@brianblakely I’m not sure (not good at JS) but I don’t think the polyfill sets the native The jcgertig/date-input-polyfill doesn’t seem to do that, and doesn’t suffer from this problem.
Well, I would not be surprised if the underlying cause were some IE bug. That bug is not getting fixed, though. |
So there is a wrinkle here. I went to test this for myself, and it actually worked correctly. When the element is blank, If possible, would you be able to create a CodePen or something that demonstrates the issue for you? |
@brianblakely http://vasiliy.faronov.name/nodep-date-input-polyfill-issue53/ |
It's rather bizarre, what I have been able to find is that this bug seemingly only manifests when the field is wrapped in a The official demo doesn't use that tag, so that is why it works in IE11. |
I think HTML constraint validation operates on forms and form inputs, not some random inputs. So this doesn’t seem too bizarre to me. |
It actually does work with any input element. |
Am I wrong thinking that not setting the value would solve the problem? It is what there are doing on https://wet-boew.github.io/wet-boew/demos/datepicker/datepicker-en.html Edit: I also noticed that the value is set in the wrong format (08/15/2018 vs the correct 2018-08-15). FWIW, https://github.com/jcgertig/date-input-polyfill works |
In IE 11, when I pick a date using the polyfill’s picker and click Submit, I get “false”.
If I type something manually into the
input
and click Submit, I get “true”.In Firefox, I get “true”.
It seems like IE’s constraint validation doesn’t care if you set the
value
attribute, only if you set thevalue
property, which the polyfill overrides.The text was updated successfully, but these errors were encountered: