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");
Hi there. I would like to help in this issue. Forgive me for being noob. What is this issue ?
The issue is that IE 11 throws an exception where it should not. If an input type is not supported it should automatically fall back to type text per spec. That's what IE 11 does with input.setAttribute() but not with input.type. So we need to make sure that we're calling setAttribute in our code.
Awesome thanks @marvinhagemeister
@marvinhagemeister I don't think input type "date" is supported in IE 11. It seems to fallback to a text input type "text" since IE 11 does not recognize "date" (in plain html file). https://stackoverflow.com/a/54846005/2445295 so we could do the same and fallback to input type "text" in IE 11 and show user appropriate warning in development mode.
Yes but when called directly in type="date" then IE will throw, when using setAttribute it will use the fallback instead of crash
You can find how we handle o ther of these edge cases in diffProps
This should be fixed by the next release thanks to #2147
Most helpful comment
Yes but when called directly in type="date" then IE will throw, when using setAttribute it will use the fallback instead of crash