-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
🐛 Bug Report
This bug can be reproduced using the interactive demos on the useDatePicker documentation page.
When I first interact with the component I'm unable to enter any dates which have 31 as the day of the month. When I type in 31, my text is cleared and the value is set to 01.
🤔 Expected Behavior
A user should be able to enter dates that have 31 as the day of the month, for example 31st Jan 2022.
😯 Current Behavior
- Focus into the day segment
- Type in
31 - Day segment shows
01 - Enter in a month and day to get a valid date
- Change day of month from
01to31
💁 Possible Solution
- Looks like something in
useDateFieldStateis the issue, but haven't had time to investigate. - Looks like
aria-valuemax="30"is set when the component is first rendered, but after some user interaction it gets set toaria-valuemax="31"
🔦 Context
💻 Code Sample
You can also see this issue in the "styled" code sandbox examples of useDatePicker.
- https://codesandbox.io/s/reverent-faraday-5nwk87?file=/src/DateField.js
- https://codesandbox.io/s/white-breeze-rer8g2?file=/src/DateField.js
🌍 Your Environment
| Software | Version(s) |
|---|---|
| react-spectrum | "@react-aria/datepicker": "3.0.0" |
| Browser | Chrome |
| Operating System | Mac |
Full list of dependencies can be found in the package.json https://codesandbox.io/s/reverent-faraday-5nwk87?file=/package.json
🧢 Your Company/Team
N/A
🕷 Tracking Issue (optional)
N/A
roviralinxea, fknop, jpagex, zyriab, splacentino and 84 more
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
📋 Waiting for Sprint