react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

feat(rangeCalendar): allow to customise the behavior when the pointer is released outside of the component

Open Jiiieeef opened this issue 2 months ago • 1 comments

Closes https://github.com/adobe/react-spectrum/issues/8850

Adds a new property to useRangeCalendar allowing you to specify the behavior when the pointer is released outside of the component:

  • select: (default) same as the current behavior, commit the hovered range dates.
  • clear: clear the current range selection.
  • reset: restore the previously selected range (i.e., the one selected before starting a new selection).

✅ Pull Request Checklist:

  • [x] Included link to corresponding React Spectrum GitHub Issue.
  • [x] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [x] Filled out test instructions.
  • [x] Updated documentation (if it already exists for this component).
  • [x] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

Jiiieeef avatar Sep 22 '25 16:09 Jiiieeef