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]: Date Picker not have flexible like HTML Date Picker #6374

Open
2 tasks done
souravh093 opened this issue Jan 16, 2025 · 1 comment
Open
2 tasks done

[feat]: Date Picker not have flexible like HTML Date Picker #6374

souravh093 opened this issue Jan 16, 2025 · 1 comment

Comments

@souravh093
Copy link

Feature description

They are unable to select different years or months, which is complex; this feature must be added.

Affected component/components

Date Picker

Additional Context

N/A

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
@sanjeevkansyakar
Copy link

Hey, @souravh093

you can modify the calendar and add years and months dropdown.

So in behind the scene shadcn Date Picker uses the "react-day-picker" library and you can modify the calendar by adding some more props like
<Calendar mode="single" captionLayout="dropdown" selected={date} onSelect={setDate} initialFocus />

Add this prop (captionLayout="dropdown") and you can select years and months

And if you want more modification, you can refer this doc and play with it.
https://daypicker.dev/playground

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

2 participants