feat(Calendar): add month/year picker modes and view switching by onmax ยท Pull Request #5981 ยท nuxt/ui
๐ Linked issue
Resolves #4889
โ Type of change
- ๐ Documentation (updates to the documentation or readme)
- ๐ Bug fix (a non-breaking change that fixes an issue)
- ๐ Enhancement (improving an existing functionality)
- โจ New feature (a non-breaking change that adds functionality)
- ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
- Add supports for calendar month picker modes via
typeprop - Add support for year picker modes via
typeprop - Interactive view switching (day -> month -> year). Maybe too opinionated?
Changes:
- Add
typeprop (date|month|year) for standalone pickers - Add
view/defaultViewprops for view state control - Clickable heading to switch views (day -> month -> year) when
type="date" - New theme slots:
monthGrid,monthCell,yearGrid,yearCell - New slots:
month-cell,year-cellfor custom rendering
๐ธ Screenshots
| Feature | Screenshot |
|---|---|
Month Picker (type="month") |
![]() |
Year Picker (type="year") |
![]() |
| View Switching (heading click) | video below |
Cap.2026-02-04.at.14.31.40.mp4
๐ Checklist
- I have linked an issue or discussion.
- I have updated the documentation accordingly.
@benjamincanac what do you think about this PR? Do you like the API?
There are some styles I would like to improve and nail down. But I think is mostly ready :)
Let me know your thoughts! Thank you!
Once we decide to move forward I will ammend PR fixing CI and fixing UI issues
Thanks for the PR! I do like the API with the type prop approach, it's consistent with other components.
However, it adds lots of code since there are no primitives for this in Reka UI. @J-Michalek what do you think about this? Are you aware of such thing being added in Reka UI any time soon?
Well there is an issue open for 8 months unovue/reka-ui#1933 and the activity in the repo is mild at best, but I think we should rely on RekaUI to provide these inputs...
Perhaps the author of this PR would be interested in implementing in RekaUI?
Iโm the author of the feature request in Reka UI (unovue/reka-ui#1933), and it has already gathered meaningful community interest (19+ reactions).
As mentioned above, this PR adds a fair amount of code mainly because Reka UI doesnโt provide primitives for month/year picking yet.
@onmax, if youโre open to it, migrating this PR to add MonthPicker and YearPicker primitives in Reka UI would be an excellent win for the ecosystem (as @J-Michalek suggested).
Thanks for the feedback. I will prepare a PR for Reka UI.
@benjamincanac, should I keep the behaviour shown in the video? I am not 100% this is the best ux ๐ค
onmax
mentioned this pull request
I think I like it yes, it avoids having to implement popover and lets us render a Calendar only for months at the same time as selecting a month for a normal calendar.
Ok, i won't bother you again ๐ฌ,
once reka ui is released and this pr is ready I will mark this pr ready and i will ping you.
Feel free to post any feedback though. Most of the code is ready. I am just testing it throughly :)
npm i https://pkg.pr.new/@nuxt/ui@5981
commit: ae0edf7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters


