You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Since Calendar is built on the DayPicker component from React DayPicker, it feels natural to extend this functionality. While we can set captionLayout, fromYear and toYear 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.
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: