fix(components): support opt-in resetOnSelect for calendar range mode#11178
Open
saadpocalypse wants to merge 1 commit into
Open
fix(components): support opt-in resetOnSelect for calendar range mode#11178saadpocalypse wants to merge 1 commit into
saadpocalypse wants to merge 1 commit into
Conversation
Upgrade react-day-picker to ^9.14.0 and document the resetOnSelect prop so users can restart range selection after a completed range without changing the default range picker behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
@saadpocalypse is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for restarting range selection after a completed range in the Calendar component. When
resetOnSelectis passed, the next click clears the previous range and sets the clicked date as the new start date. Default range selection behavior is unchanged when the prop is omitted.Relates to
Fixes #11159
Changes
react-day-pickerto^9.14.0inapps/v4/package.jsonto support the nativeresetOnSelectprop.resetOnSelectinapps/v4/content/docs/components/base/calendar.mdxandapps/v4/content/docs/components/radix/calendar.mdx.calendar-rangedemos inapps/v4/examples/base/calendar-range.tsxandapps/v4/examples/radix/calendar-range.tsxto useresetOnSelect.Test plan
/docs/components/base/calendar#range-calendarresetOnSelectis not passed