Skip to content

Calendar does not react to a change of value if lands in prev/next month #3408

@coreylight

Description

@coreylight

🐛 Bug Report

When programmatically changing the value for DatePicker (or DateRangePicker), if the day/range lands in the previous month, the UI does not show the correct selected month.

🤔 Expected Behavior

The UI should update to show the picked day/range when value updates.

😯 Current Behavior

Month does not switch.
See Codesandbox example

🔦 Context

We need the UI to update correctly. While the DatePicker assumes that the popover will be closed when choosing a new value, this is not true for our use case.

💻 Code Sample

See Codesandbox example

🌍 Your Environment

Software Version(s)
react-spectrum 3.20.0
Browser Chrome 104.0.5112.79
Operating System OSX Monterey

🧢 Your Company/Team

Mastery Logistics Systems

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions