fix(DateInput3): Fix wrong today date for timezone mismatch #7122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
DateInput3
docsPreviously 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).