Skip to content

Conversation

@martijnrusschen
Copy link
Member

@martijnrusschen martijnrusschen commented Dec 5, 2025

When users programmatically set date values (e.g., via "Today" or "This Week" buttons), the calendar now navigates to display the month containing the newly selected date. Previously, the calendar would remain on the previously viewed month even though the underlying date values were correctly updated.

This fix updates preSelection in componentDidUpdate when:

  • selectsRange is true and startDate changes to a different month/year
  • selected prop changes to a different month/year (single date mode)

Fixes #3367

…mmatically

When users programmatically set date values (e.g., via "Today" or "This Week"
buttons), the calendar now navigates to display the month containing the newly
selected date. Previously, the calendar would remain on the previously viewed
month even though the underlying date values were correctly updated.

This fix updates preSelection in componentDidUpdate when:
- selectsRange is true and startDate changes to a different month/year
- selected prop changes to a different month/year (single date mode)

Fixes #3367

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

Co-Authored-By: Claude <noreply@anthropic.com>
@martijnrusschen martijnrusschen changed the title fix: Update calendar view when selected/startDate props change progra… fix: Update calendar view when selected/startDate props change programmatically Dec 5, 2025
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (69da2fe) to head (393cd91).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6111   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files          30       30           
  Lines        3653     3655    +2     
  Branches     1577     1578    +1     
=======================================
+ Hits         3625     3627    +2     
  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.

@martijnrusschen martijnrusschen merged commit 5634c50 into main Dec 8, 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.

Calendar does not refresh when date changes

2 participants