Skip to content

fix(datepicker): Add local timezone offset to display date - #2778

Merged
mergify[bot] merged 1 commit into
box:masterfrom
tjuanitas:fix-datepicker-display-date
Dec 17, 2021
Merged

fix(datepicker): Add local timezone offset to display date#2778
mergify[bot] merged 1 commit into
box:masterfrom
tjuanitas:fix-datepicker-display-date

Conversation

@tjuanitas

Copy link
Copy Markdown
Contributor

The toISOString() method converts the date to UTC (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).

This adds a local timezone offset to the ISO string so that the date section is properly associated with the local time.

This was tested in Chrome, Firefox, and Safari and using system settings to mock different timezones.

@tjuanitas
tjuanitas requested a review from a team as a code owner December 17, 2021 22:25
@mergify
mergify Bot merged commit 1f1abaa into box:master Dec 17, 2021
@tjuanitas
tjuanitas deleted the fix-datepicker-display-date branch December 17, 2021 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants