react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

[RAC] DateRangePicker- input value isn't updated when granularity is < day

Open tothandras opened this issue 11 months ago โ€ข 2 comments

Provide a general summary of the issue here

Input value isn't updated when date range is selected when granuality="second" and value is currently empty.

๐Ÿค” Expected Behavior?

Input should be updated with the selected date range.

๐Ÿ˜ฏ Current Behavior

Image Image

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

Go to the Granuality example: https://react-spectrum.adobe.com/react-aria/DateRangePicker.html

Version

react-aria-components 1.6.0

What browsers are you seeing the problem on?

Chrome, Firefox, Safari

If other, please specify.

No response

What operating system are you using?

macOS

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

tothandras avatar Jan 30 '25 14:01 tothandras

Thanks for reporting this! Seems like a bug. I think it broke in this PR https://github.com/adobe/react-spectrum/pull/7368 when we updated the types, so probably something related to that. I don't think it necessarily has to do with the granularity. Haven't dug into it too much though.

yihuiliao avatar Jan 30 '25 18:01 yihuiliao

The bug still reproduces on the current version of RAC. So basically this bug completely prevents using of DataRangePicker with granularity greater than day since in most cases the initial value is supposed to be empty.

It also reproduces in the official docs: https://react-spectrum.adobe.com/react-aria/DateRangePicker.html#granularity

bacher avatar May 30 '25 13:05 bacher