IE11 throws on input type="date"
See original GitHub issueReported via slack:
charlie 9:56 PM going for a good head scratcher… If I I have IE11 just breaks with a “Error: Invalid argument.” error (changing the type to text brings it back to life). Fine in 8. While the type isn’t supported, I’d expect IE to just gracefully degrade back to a text input.
Had a quick look into it and IE 11 throws when you try to use the setter directly with a value it doesn’t support.
// Throws
input.type = "date";
// Works
input.setAttribute("type", "date");
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Datepicker Support in IE11 and Firefox - Stack Overflow
Internet Explorer 11 does not currently support <input type='date '> , though we did recently announce that work was underway to do so....
Read more >Bootstrap datetime not works in IE 11 but works in chrome
Am looking for a datetime control and came up with the below code which works only on chrome but throws error on IE...
Read more >HTML DOM Input Date Object - W3Schools
The Input Date object represents an HTML <input> element with type="date". Note: <input type="date"> does not show as a proper date field in...
Read more >Broken Sitecore Forms Date Picker in IE11
Being on Sitecore 9.2 and SXA 1.9 we want to use the OOTB date Picker field on Sitecore Forms which is working fine...
Read more >Handling common HTML and CSS problems - MDN Web Docs
Should a browser not support an input type, the user can still enter the required data. The following example shows date and time...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes but when called directly in type=“date” then IE will throw, when using setAttribute it will use the fallback instead of crash
This should be fixed by the next release thanks to #2147