html icon indicating copy to clipboard operation
html copied to clipboard

an input with a type_ of "date" causes an "invalid argument" script error in IE.

Open barooo opened this issue 7 years ago • 4 comments

Reproduced here in Internet Explorer 11.0.15063.0 / Win 10 build 1703:

https://ellie-app.com/3Tpyqdmhsz9a1/2

Works in edge, chrome, safari (falls back to text input, seemingly) and iOS. In ie 11, it crashes with a SCRIPT87 "invalid argument" inside applyFacts().

This may be a known issue / "don't use input type='date' if you need ie 11 support" but I couldn't find it reported anywhere else.

I worked around my issue for now by using elm-community/elm-datepicker.

barooo avatar Jul 31 '17 16:07 barooo

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

process-bot avatar Jul 31 '17 16:07 process-bot

Linking this to https://github.com/elm-lang/virtual-dom/issues/106 for tracing.

zwilias avatar Oct 04 '17 13:10 zwilias

As it says in my initial report, I used elm-community/elm-datepicker instead of HTML 5, which is probably a better solution anyway since it's designed to work the same everywhere, instead of "whatever the browser decides to do", I was just lazy the first time through and did type_ date.

On Wed, Jan 10, 2018 at 1:24 PM, SylvieC [email protected] wrote:

I have the same issue with SCRIPT87 error in IE. Can you let me know how you found a workaround for a date input?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/elm-lang/html/issues/143#issuecomment-356709002, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOIs1XlK2-jMUaHNyWUgJKLPivnhZJQks5tJQ5lgaJpZM4OooPS .

barooo avatar Jan 11 '18 19:01 barooo

I'd rather like to use the browser's native implementation not only to get rid of code on my side, but to work properly in, say, a mobile environment. There is a patch for virtual dom: https://github.com/elm-lang/virtual-dom/pull/87 which should at least not make it crash so that some polyfill has the chance to kick in.

muelli avatar Apr 19 '18 17:04 muelli