chemerisuk / better-dateinput-polyfill

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

In Safari every action subtracts 1 from the day #127

Closed marcpeabody closed 4 years ago

marcpeabody commented 4 years ago

You can reproduce this in the demo in Safari: http://chemerisuk.github.io/better-dateinput-polyfill/

Select a date. The date that appears in the input is one less than what you select. Use any arrow key or vi key to navigate. The end result is one less than what it should have done.

fstani commented 4 years ago

Seems like part of the issue is how Safari handles dates and timezones, seems like when the date is created it creates in UTC, so if you are in a GMT-X timezone it will subtract a day

I have sometime, I'll try to fix this and send a PR

fstani commented 4 years ago

@chemerisuk I've added a PR to fix this, take a look and check if you want to merge it

chemerisuk commented 4 years ago

Bugfix published in v3.3.1