brianblakely / nodep-date-input-polyfill

Automatically adds datepickers to input[type=date] on IE, macOS Safari, and legacy browsers.
https://www.npmjs.com/package/nodep-date-input-polyfill
MIT License
96 stars 137 forks source link

Chrome Native Date Picker Conflict #34

Closed MattSidor closed 7 years ago

MattSidor commented 7 years ago

When I test this in Chrome 55+, the native date picker overlaps with this script's version (depending on where I click in the input box), and only the native picker will let me choose a date.

nodep-date-input-polyfill

Is this expected behavior? If so, do I need to detect the user's browser and only load this library if the browser is IE, Firefox, or Safari?

deltragon commented 7 years ago

same behaviour confirmed on android 5.1 webview/browser. feature request to use modernizr to detect native datepickers?

brianblakely commented 7 years ago

Thanks a lot for your report!

Your example case is the library's debug page. In the HTML for that page, the library <script> is included with the data-nodep-date-input-polyfill-debug attribute, which makes the library ignore its detection code.

If you're just playing with the debug page, just remove that attr to see the true library behavior.

If you're including the library in your app, use one of the methods described in the README.

If there are any details I've missed, please comment and tell me!

MattSidor commented 7 years ago

Thanks very much @brianblakely