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

Datepicker adds one hour between March 9 and March 29 2025 #1091

Open
aostijn opened this issue Mar 7, 2025 · 2 comments
Open

Datepicker adds one hour between March 9 and March 29 2025 #1091

aostijn opened this issue Mar 7, 2025 · 2 comments
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working

Comments

@aostijn
Copy link

aostijn commented Mar 7, 2025

Describe the bug
For some reason, when the device's timezone does not match the timezone provided to the datepicker and I select a date between March 9 and March 29 2025, an hour is added to the chosen time. Outside of these dates, there's no issue in the year 2025. The same issue occurs between March 8 and March 28 2026. Haven't tried for following years but the pattern might continue. It also doesn't happen for every combination of device timezone and the timezone provided to the datepicker. Some more investigation would be needed to determine the exact conditions in which the issue occurs.

The issue was already present in v9.0.3, maybe already before. Still present in v11.0.1.

To Reproduce

  1. Set your device's timezone to Europe/Brussels.
  2. Go to this example.
  3. Choose a date and time between March 9 and March 29 2025.
  4. Confirm the date and time.
  5. Observe how one hour is added to the time.

Expected behavior
The time should be the same as selected.

Screenshots
Image

Desktop & mobile (please complete the following information):

  • Browser: Chrome Version 131.0.6778.140 (Official Build) (64-bit)
  • Library version: 11.0.1
@aostijn aostijn added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Mar 7, 2025
@RickSchijvenaars
Copy link

RickSchijvenaars commented Mar 7, 2025

I am experiencing the exact same issue. I believe it is related to Daylight Saving Time (DST) in the U.S., which begins on the second Sunday of March (March 9 in 2025), and DST in Europe, which begins on the last Sunday of March (March 30 in 2025). This specific period seems to be causing issues.

What I would expect is that selecting a different date does not change the selected time.

EDIT: now, March 10, the following is happening:

  • Providing prop timezone America/New_York, and having system timezone set to America/New_York, it decreases 1 hour every time I select a date from November 2 (end DST America)
  • Providing prop timezone America/New_York, and having system timezone set to Europe/Amsterdam, it decreases 1 hour every time I select a date between March 29 - October 26 (DST Europe)
  • Providing prop timezone Europe/Amsterdam, and having system timezone set to Europe/Amsterdam, experiencing no issues when selecting several dates inside and outside DST
  • Providing prop timezone Europe/Amsterdam, and having system timezone set to America/New_York, it increases 1 hour every time I select a date between March 29 - October 26 (DST Europe)

@KenKodz
Copy link

KenKodz commented Mar 14, 2025

Just to add some info to this, this seems to only happen if you specify the timezone. If you don't set the timezone and are in that timezone, it works fine.

For example, if I set the timezone to 'America/New_York', it subtracts an hour when I click select. However, since I am in that timezone and I don't add the timezone property, it works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage The issue is not reviewed by the maintainers bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants