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

[ui5-daterange-picker] Timezone issue - firstDateValue and lastDateValue attributes are wrong #2221

Closed
Neeeko opened this issue Sep 16, 2020 · 0 comments · Fixed by #2277
Closed

Comments

@Neeeko
Copy link

Neeeko commented Sep 16, 2020

I'm part of the SuccessFactors team

Describe the bug
Following my previous issue: #2182
The UI of the ui5-daterange-picker now works properly and display the correct value (0.23.2).
However, on the same timezone as the previous issue, the firstDateValue and lastDateValue contains wrong Dates.

For example: selecting Sep 1, 2020 - Sep 30, 2020 =>
firstDateValue = Sun Aug 30 2020 16:00:00 GMT-0800 (Alaska Daylight Time)
lastDateValue = Mon Sep 28 2020 16:00:00 GMT-0800 (Alaska Daylight Time)

while it would probably make more sense to have something like:
firstDateValue = Tue Sep 1 2020 00:00:00 GMT-0800 (Alaska Daylight Time)
lastDateValue = Wed Sep 30 2020 00:00:00 GMT-0800 (Alaska Daylight Time)

To reproduce
Steps to reproduce the behavior:

  1. Change your computer timezone to a timezone in the US West Coast (for example in Anchorage, Alaska). (Using a Mac, go to Preferences => Date and Time => Time zone.
  2. Go to https://codesandbox.io/s/tender-shtern-85xgu?file=/src/App.js and select dates in the DateRangePicker
  3. The dates are wrong.

Expected behavior
DateRangePicker should be timezone agnostic. The dates that are displayed in the ui5-daterange-picker and the dates in firstDateValue and lastDateValue should be identical.

Screenshots
Screen Shot 2020-09-16 at 01 12 33

Context

  • UI5 Web Components version: 0.23.2
  • OS/Platform: macOS Catalina

Affected components ui5-daterange-picker

@ilhan007 ilhan007 added this to the 0.23.3 milestone Sep 16, 2020
@ilhan007 ilhan007 modified the milestones: 0.23.3, 0.23.4 Sep 16, 2020
ilhan007 pushed a commit that referenced this issue Oct 1, 2020
Fix the return values of first and last date  public getters, previously returning wrong values.

Fixes #2221
ilhan007 pushed a commit that referenced this issue Oct 17, 2020
Fix the return values of first and last date  public getters, previously returning wrong values.

Fixes #2221
ilhan007 pushed a commit that referenced this issue Nov 11, 2020
Fix the return values of first and last date  public getters, previously returning wrong values.

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

Successfully merging a pull request may close this issue.

3 participants