Skip to content
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

Open
2 tasks done
chesha1 opened this issue Dec 28, 2024 · 0 comments
Open
2 tasks done

[feat]: Quick Navigation by Year in Calendar #6196

chesha1 opened this issue Dec 28, 2024 · 0 comments

Comments

@chesha1
Copy link

chesha1 commented Dec 28, 2024

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. 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.

similar issue #880

Affected component/components

Calendar

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant