Skip to content

Conversation

@martijnrusschen
Copy link
Member

@martijnrusschen martijnrusschen commented Dec 8, 2025

Fixes #5459

When typing a partial date (e.g., just "2014") in the input field, the calendar now navigates to that year/month even though the full date cannot be parsed. This restores the v7 behavior where users could search through the calendar by typing partial dates.

  • Add parseDateForNavigation() to extract year/month from partial input
  • Update handleChange to use partial navigation when full parse fails
  • Respect minDate/maxDate constraints when navigating
  • Handle invalid input gracefully (returns null, calendar stays put)

When typing a partial date (e.g., just "2014") in the input field,
the calendar now navigates to that year/month even though the full
date cannot be parsed. This restores the v7 behavior where users
could search through the calendar by typing partial dates.

- Add parseDateForNavigation() to extract year/month from partial input
- Update handleChange to use partial navigation when full parse fails
- Respect minDate/maxDate constraints when navigating
- Handle invalid input gracefully (returns null, calendar stays put)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Dec 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (5634c50) to head (07acf3f).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6113   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files          30       30           
  Lines        3655     3674   +19     
  Branches     1578     1574    -4     
=======================================
+ Hits         3627     3646   +19     
  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 and others added 3 commits December 8, 2025 12:11
Add test case to verify calendar view remains unchanged when typing
partial date input without a valid 4-digit year.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use year "2000" which doesn't match month regex, ensuring the
refDate.getMonth() fallback on line 181 is covered.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@martijnrusschen martijnrusschen merged commit 2a3198e 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.

Search date by keyboard typing does not work v8

2 participants