adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.15k stars 1.06k forks source link

DateRangePicker days change automatically when updating year in Thai Calendar #6536

Open yuradmytriev opened 3 weeks ago

yuradmytriev commented 3 weeks ago

When using the DateRangePicker component with the Thai calendar (th-u-ca-buddhist locale), the days change automatically when updating the year. This behavior is unexpected and leads to incorrect date selections.

πŸ€” Expected Behavior?

The selected days should remain consistent when updating the year.

😯 Current Behavior

The selected days change automatically when the year is updated.

πŸ’ Possible Solution

πŸ”¦ Context

This issue is reproducible only when the Provider has the th-u-ca-buddhist locale set:

<Provider
  locale={"th-u-ca-buddhist"}
  colorScheme="light"
  theme={defaultTheme}
>
  <DateRangePicker />
</Provider>

πŸ–₯️ Steps to Reproduce

Steps to Reproduce:

https://github.com/adobe/react-spectrum/assets/8845603/ec587f02-6e7b-40a4-9d3b-c896cefecd9e

Version

3.34.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

macOS

🧒 Your Company/Team

No response

πŸ•· Tracking Issue

No response

LFDanLu commented 3 weeks ago

Perhaps in a similar vein to https://github.com/adobe/react-spectrum/issues/3757, will need to double check https://github.com/unicode-org/icu/blob/main/icu4j/main/core/src/main/java/com/ibm/icu/util/BuddhistCalendar.java