[@mantine/dates] Apply numberOfRows consistently to year and decade levels #8691
Replies: 2 comments
-
|
Hi there! 👋 I wanted to share some more context here since I already have a working implementation ready in PR #8690. The gap: What the PR adds: If anyone else has needed a multi-row calendar layout, I'd appreciate a 👍 on the PR to help move things forward. Feedback on the implementation is very welcome! Thanks for your time 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
Update — standalone package available Since this hasn't moved forward upstream and I needed the feature in production, I went ahead and published it as a standalone package: 📦 mantine-calendar-rows on npm — source on GitHub It provides drop-in wrappers around @mantine/dates (Calendar, DatePicker, DatePickerInput, DateTimePicker, MonthPicker, YearPicker, plus the input variants and level groups) that add a numberOfRows prop. No fork — the unmodified upstream @mantine/dates is a peer dependency, so it rides along with whatever Mantine version you're on. Under the hood it uses Mantine's public StylesApi to switch the inner levelsGroup slot from flex to a CSS grid with numberOfColumns columns × numberOfRows rows. withNext / withPrevious / chevron logic keeps working correctly because Mantine still sees a single logical row of N levels — only the visual layout is rearranged. Usage is just an import swap: // before |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When using Calendar with
umberOfColumns +
umberOfRows, month level supports the expected multi-row layout, but year/decade levels are not fully aligned with the same behavior.
Proposal
Apply
umberOfRows consistently across all Calendar levels:
This keeps visible panel count and navigation edge logic consistent across levels.
Notes
I already prepared an implementation and can open a PR.
Beta Was this translation helpful? Give feedback.
All reactions