palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.54k stars 2.16k forks source link

DateRangePicker month display issue with Daylight Saving Time (DST) transition #4614

Open snirrotem opened 3 years ago

snirrotem commented 3 years ago

Environment

"@blueprintjs/core": "3.9.0",
"@blueprintjs/datetime": "3.7.1",
"@blueprintjs/icons": "3.3.0",
"@blueprintjs/select": "3.3.0",

Code Sandbox

https://codesandbox.io/s/blueprint-daterangepicker-bug-sandbox-forked-j8kv8?file=/src/index.tsx

Steps to reproduce

  1. set a min date to a date PRIOR to DST transition, at least 31 days before maxDate, so multiple months are showing (ex. Dec 30, 2020)
  2. set a max date to a date LATER than DST transition (ex. Mar 30. 2021)
  3. inspect the months' captions

Actual behavior

both captions show wrong month name, and the day pickers themselves show incorrect months display.

Expected behavior

Captions should show the correct months. Day pickers should show the correct month.

Screenshot 2021-03-30 210213

ahuviy commented 3 years ago

I encountered this issue too. Any news update?

adidahiya commented 3 years ago

Can you be more specific about the actual / expected behavior? What is the exact expected output? This is what I see in your code sandbox (it's different from your screenshot):

image

snirrotem commented 3 years ago

the issue somehow resolved itself on April 1st. it only reproduces between DST transition date and 31st of march.

you can reproduce it by manually setting your machine's date to March 30th for instance. then you will see that:

  1. both pickers' captions read 'January'
  2. left day picker is showing the month of march, while the right showing the month of april.