Sqrrl / wc-datepicker

A small, accessible and customizable datepicker written in TypeScript.
https://sqrrl.github.io/wc-datepicker
MIT License
55 stars 7 forks source link

[BUG] Broken calendar in some timezones #10

Closed fymmot closed 1 year ago

fymmot commented 1 year ago

Hi! I received feedback from an American user that the calendar does not handle timezones and can break or give incorrect results. See issue https://github.com/fymmot/inclusive-dates/issues/42 in my repo.

For instance, if you change your local timezone to US East coast or Sao Paolo in the browser, the days of the month go missing and the date selection is incorrect. If I click October 29 the selected value will be October 28

image
Sqrrl commented 1 year ago

Thanks for reporting. Dates are hard. 😬

Should be fixed with v0.5.1.

fymmot commented 1 year ago

Nice work! Do you think it would be possible to add timezone tests to the unit tests?