chemerisuk / better-dateinput-polyfill

input[type=date] polyfill
http://chemerisuk.github.io/better-dateinput-polyfill/
MIT License
259 stars 58 forks source link

V3 doesn't work in IE 11 #106

Closed Teamop closed 6 years ago

Teamop commented 6 years ago

Reproduce step:

Just open the demo in the repo in IE 11, the datepicker cannot be popped up and it's totally blank, even input something in the input, just blank and cannot see anything except the cursor moving.

TylerRick commented 6 years ago

Ouch. Just got bit by that too. Unfortunately, it defeats the whole purpose of using this polyfill if it doesn't work on IE11... :disappointed:

Any ideas how to fix?

TylerRick commented 6 years ago

I also tried the latest v2 (https://github.com/chemerisuk/better-dateinput-polyfill/tree/v2.0.2) to see if it's just a problem with v3, but that had problems too: Although the picker appeared, the month and year were invisible (probably easy to fix with CSS) and worse, when you clicked on a date, it didn't seem to select it (no value appeared in the input).

So what is a person to use for a polyfill?

I also tried out https://github.com/brianblakely/nodep-date-input-polyfill but it doesn't seem to submit the value as yyyy-mm-dd.

In the past I would have turned to https://github.com/aFarkas/webshim but it looks like it is no longer maintained....

Teamop commented 6 years ago

@TylerRick I have used v2.0.2 for a long time without having problems.

chemerisuk commented 6 years ago

Hi guys, thank you for the report. I'll check IE10-11 as soon as will be able to.

Lazza commented 6 years ago

month and year were invisible

@TylerRick did you import all the things correctly? Check out the archived demo, you need quite a few scripts but it works:

https://web.archive.org/web/20180402164909/http://chemerisuk.github.io/better-dateinput-polyfill/

As an added bonus, it gives much less trouble with positioning (margins and stuff) than v3.

PadmapriyaVasudevan commented 6 years ago

Hi, I have added better-dateinput-polyfill in my project but it doesn't seem to work in IE 11.But in this link https://web.archive.org/web/20180402164909/http://chemerisuk.github.io/better-dateinput-polyfill/ its working in IE 11 works fine. To make it work anything needs to be modified or changed in the code.

Teamop commented 6 years ago

@PadmapriyaVasudevan use v2.0.2, not the latest v3

PadmapriyaVasudevan commented 6 years ago

@Teamop Thanks much for your reply. Everything else is working as expected rather than data-format attribute. I am unable to modify the date format (mm/dd/yyyy)

PadmapriyaVasudevan commented 6 years ago

And also while submitting the value is not getting assigned to the formControlName.

chemerisuk commented 6 years ago

Fixed in v3.0.1. There some tweaks with the displayed value presentation that have to be done, but it works at least on IE 10-11.

PadmapriyaVasudevan commented 6 years ago

@chemerisuk Thanks much for your reply.

PadmapriyaVasudevan commented 5 years ago

@chemerisuk I have tried the latest version 3.1.2. While submitting the value, it's taken as undefined and am not able to set the customized date-format. And also am getting an Whitespace expected error

chemerisuk commented 5 years ago

@PadmapriyaVasudevan I believe you have an error somewhere else. Everything is working on my side. In order to customize presented value try to add data-format='{"month":"short","year":"numeric","day":"numeric"}' on the element, for instance. Note: IE10 does not support Intl API, so the displayed value there is always the same, IE11 works well.

rdm-dev09 commented 5 years ago

I've got the same whitespace error, using these versions of better-dom and better-dateinput-polyfill.min.js:

https://cdn.jsdelivr.net/npm/better-dom@4.0.0/dist/better-dom.min.js https://cdnjs.cloudflare.com/ajax/libs/better-dateinput-polyfill/3.1.3/better-dateinput-polyfill.min.js

Do these versions not work together? I'm not sure right now what other explanation there is for us getting this same error. (XML5607: Whitespace expected. Line: 1, Column 129)

To add a bit more information, in IE 11, it happens both on pageload, and when clicking the input to open the calendar, and when the calendar closes. The month part of the calendar is displaying fine, but the days do not appear.

chemerisuk commented 5 years ago

Try to install files from npm as described in readme and check if there is a problem. I’ve never experienced such an issue.