question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE11 throws on input type="date"

See original GitHub issue

Reported 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
JoviDeCroockcommented, Nov 23, 2019

Yes but when called directly in type=“date” then IE will throw, when using setAttribute it will use the fallback instead of crash

0reactions
JoviDeCroockcommented, Nov 23, 2019

This should be fixed by the next release thanks to #2147

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found