Skip to content

ReactAriaDatePicker defaultOpen={true} incorrectly sets isPressed=true on child Button elements #8188

Closed
@Raja-Techie-45

Description

@Raja-Techie-45

Provide a general summary of the issue here

When using defaultOpen={true} on the ReactAriaDatePicker component, the calendar should open by default, but child Button elements should maintain their normal state unless explicitly pressed. The isPressed state should only apply to the trigger button that opens the calendar, not all Button components within the DatePicker hierarchy.

🤔 Expected Behavior?

When using defaultOpen={true} on the ReactAriaDatePicker component, the calendar should open by default, but child Button elements should maintain their normal state unless explicitly pressed. The isPressed state should only apply to the trigger button that opens the calendar, not all Button components within the DatePicker hierarchy.

😯 Current Behavior

Setting defaultOpen={true} on ReactAriaDatePicker causes all child Button elements within the component hierarchy to receive an isPressed=true state by default, even when they're not directly related to the opening/closing mechanism of the calendar.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

You can check the issue in below code sandbox link
https://codesandbox.io/p/sandbox/qyzpxw

Version

react-aria-components:1.8.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Ubuntu 24.04.2 LTS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    waitingWaiting on Issue Author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions