Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to disable snapping of calender months in DateRangePicker #3855

Open
rickhellenthal opened this issue Jun 25, 2024 · 0 comments
Open

Comments

@rickhellenthal
Copy link

What problem does this feature solve?

Currently in the DateRangePicker when you select the start date in one calendar both the calendars snap to the month of the selected date and the next month. We would like the option to disable this behavior and the calendars have the ability to stay where they are when a date is selected. Similar to the behavior in v4 of rsuite.

For example:

  • It is June now. The user navigates to December in the right calendar. The left calendar is untouched and stays in June.
  • User selects a start date, for example 12 December
  • The left calendar now snaps to December and the right calendar snaps to January

What does the proposed API look like?

Possibility to pass a prop (adaptiveCalendars?: boolean; or calendarSnapping?: boolean; for example) to the DateRangePicker. If this is set to false the calendar no longer snaps a different position. Similar to the bahavior of rsuite v4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant