Skip to content

fix: ensure final week renders when endMonth clips the calendar#2856

Merged
gpbl merged 5 commits intomainfrom
fix-end-month-grid-end
Nov 29, 2025
Merged

fix: ensure final week renders when endMonth clips the calendar#2856
gpbl merged 5 commits intomainfrom
fix-end-month-grid-end

Conversation

@gpbl
Copy link
Copy Markdown
Owner

@gpbl gpbl commented Nov 27, 2025

This PR addresses the issue reported by @Toni997 where, when endMonth is set, the final month’s last week is truncated and missing the remaining table cells. The fix ensures the grid still renders through the end of that week while respecting the endMonth constraint.

Changes

  • Adjust grid date generation to stop at the earlier of the display months’ end week, so the last row is fully rendered instead of truncating.
  • Update max-date tests to expect the final week boundary.

Breaking change note

No public API changed, so semver-wise it’s a bugfix (patch) rather than a breaking/major change. We should however note in the changelog that the last month with endMonth now renders a full final week row; consumers with brittle DOM/snapshot/visual tests or custom CSS might see diffs and need to update snapshots/styles.

Result

Empty table cells are rendered in the last week:

Screenshot 2025-11-27 at 19 51 53

@gpbl gpbl merged commit e166841 into main Nov 29, 2025
20 checks passed
@gpbl gpbl deleted the fix-end-month-grid-end branch November 29, 2025 10:59
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.

1 participant