Skip to content

Conversation

@martijnrusschen
Copy link
Member

@martijnrusschen martijnrusschen commented Dec 4, 2025

When using monthsShown={2} with selectsRange={true}, selecting a date from the second calendar no longer causes the view to jump back to the first month.

The previous fix for #5939 unconditionally reset monthSelectedIn to 0 on every update when selectsRange was true. This fix changes it to only reset when the calendar opens (transitions from closed to open), which preserves the #5939 fix while allowing normal interaction with the second calendar.

Fixes #5275

…ange mode

When using monthsShown={2} with selectsRange={true}, selecting a date
from the second calendar no longer causes the view to jump back to the
first month.

The previous fix for #5939 unconditionally reset monthSelectedIn to 0
on every update when selectsRange was true. This fix changes it to only
reset when the calendar opens (transitions from closed to open), which
preserves the #5939 fix while allowing normal interaction with the
second calendar.

Fixes #5275

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@martijnrusschen martijnrusschen changed the title fix: prevent month view jump when selecting from second calendar in r… fix: prevent month view jump when selecting from second calendar in range mode Dec 4, 2025
@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (ff23ce8) to head (ff5e4b4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6103   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files          30       30           
  Lines        3647     3651    +4     
  Branches     1574     1578    +4     
=======================================
+ Hits         3619     3623    +4     
  Misses         27       27           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@balajis-qb
Copy link
Contributor

Hi @martijnrusschen, I Verified this fix. It's working good

@martijnrusschen martijnrusschen merged commit 3d1f966 into main Dec 5, 2025
6 checks passed
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

Successfully merging this pull request may close these issues.

When displaying 2 months and having an embedded calendar, the months shift when the user selects the second calendar

3 participants