-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Calendar not passing down isSelected, or setting data-selected if disabled #7334
Comments
import { Calendar } from '@adobe/react-spectrum'; const MyCalendar = () => { return ( |
Thanks, seems working for me |
Thanks It is working for me. |
Thanks, I did something similar for react-aria-components. If anyone else wants to fix this issue for react-aria-components, I recommend using isSelected when isDisabled is set to false and using a comparison if isDisabled is set to true. |
Provide a general summary of the issue here
I'm not sure if this is on purpose?
When a calendar or calendar range is disabled, if a date or date range is selected it will not pass down isSelected to the cell and will not display is data-selected within element.
🤔 Expected Behavior?
That it will still pass down isSelected and data-selected
😯 Current Behavior
It does not pass down isSelected, and does not set the item as data-selected
💁 Possible Solution
Pass down isSelected and set data-selected
🔦 Context
If a calendar is disabled, it could still have a value assigned to it. It would be nice to be able to display this value.
🖥️ Steps to Reproduce
Select Date, click Disabled checkbox in the example
https://codesandbox.io/p/sandbox/elastic-joana-kf8k9v?workspaceId=7d57ca20-32a2-4d32-9ca8-1de01205fd9e
Version
react-aria-components 1.3.3
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Windows 11
🧢 Your Company/Team
n/a
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: