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

fix(DateInput3): Fix wrong today date for timezone mismatch #7122

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

jscheiny
Copy link
Contributor

Changes proposed in this pull request:

There was an issue that would occur if the current date in the selected timezone of the DateInput3 component didn't match the current date in the user's local timezone. In such a case, selecting the "Today" option in the actions bar of the component would result in showing the current date in the user's local timezone rather than the selected timezone.

As of this PR, if the user clicks today and a timezone is selected, the current time will be translated into the selected timezone and thus read properly.

To try this out:

  • Go to the DateInput3 docs
  • Turn on the "Show actions bar" toggle
  • Change the timezone to something far in the future (e.g. Auckland, NZ).
  • Open the popover and select today

Previously the date selected would appear to match the user's local date. Now, the date selected will be one day in the future (but represent the current actual time translated to that timezone).

@jscheiny jscheiny marked this pull request as ready for review December 11, 2024 16:03
@svc-palantir-github
Copy link

Prettier fix

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

ggdouglas
ggdouglas previously approved these changes Dec 11, 2024
@policy-bot policy-bot bot dismissed ggdouglas’s stale review December 11, 2024 17:32

Invalidated by push of 48136fb

@svc-palantir-github
Copy link

Tests

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@jscheiny jscheiny merged commit 05ace3a into develop Dec 11, 2024
13 checks passed
@jscheiny jscheiny deleted the js/fix-date-input-3-today-tz branch December 11, 2024 18:08
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.

3 participants