Skip to content

[useRangeCalendar] Should interacting outside RangeCalendar cancel ongoing selection instead of fulfill it? #5709

@QzCurious

Description

@QzCurious

Provide your feedback here.

It's convert from discussions #5702

Just like clicking outside a dialog would effectively close it. So should RangeCalendar, for UX of my.

If it works as design, I would like to know why. Thanks.

Screen.Recording.2024-01-16.at.10.47.17.PM.mov

The running code is an example from docs

And code of the behavior is here

// Also stop range selection on blur, e.g. tabbing away from the calendar.
res.calendarProps.onBlur = e => {
if ((!e.relatedTarget || !ref.current.contains(e.relatedTarget)) && state.anchorDate) {
state.selectFocusedDate();
}
};

BTW, I filed another discussion #5703 which might somehow related to this one.

🔦 Context

No response

💻 Code Sample

No response

Version

react-aria 3.31.0

What browsers are you seeing the problem on?

No response

If other, please specify

No response

What operating system are you using?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions