Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with locale settings interfering with date ranges #27

Open
CalumMortimer opened this issue Dec 21, 2021 · 0 comments
Open

Bug with locale settings interfering with date ranges #27

CalumMortimer opened this issue Dec 21, 2021 · 0 comments

Comments

@CalumMortimer
Copy link

Hi, great calendar. I have discovered a bug with locale while using the examples.

My "endDate" attribute of a current event is stored as "Thu Apr 01 2021 00:00:00 GMT+0100 (British Summer Time)" - probably based on my computer settings.

When displaying the "toISOString()" within the Modal, this converts to "2021-03-31T23:00:00.000Z"

Therefore, the Modal date range will be short by one day in both start and end date when updating the event. I suspect this will happen everywhere the locale time is set to UTC + x hours. So everywhere in the East half of the world.

The Calendar class should ignore locale settings completely and process dates in UTC only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant