-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat]: Quick Navigation by Year in Calendar #6196
Labels
Comments
Perhaps we need to wait a long time for this, so I’ve created a simple version in the meantime. https://github.com/huybuidac/shadcn-datetime-picker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature description
In the current version of the
Calendar
, there are only two buttons for navigating to the previous or next month.I wonder if it would be possible to add a way to select a specific year or month, similar to using
captionLayout="dropdown"
in React DayPicker. SinceCalendar
is built on theDayPicker
component from React DayPicker, it feels natural to extend this functionality. While we can setcaptionLayout
,fromYear
andtoYear
in<Calendar>
, this approach lacks official support from shadcn/ui, leading to bad caption styling.Alternatively, another approach could be to add two additional buttons on either side of the existing ones, allowing users to jump to the previous or next year, similar to the calendar in Ant Design. While this might require more effort, I guess adding two buttons could better align with the minimalist design philosophy of libraries like shadcn.
similar issue #880
Affected component/components
Calendar
Additional Context
Additional details here...
Before submitting
The text was updated successfully, but these errors were encountered: