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] Add a default mode prop to the Calendar component #2973

Open
dzole0311 opened this issue Jul 12, 2024 · 0 comments
Open

[feat] Add a default mode prop to the Calendar component #2973

dzole0311 opened this issue Jul 12, 2024 · 0 comments
Labels
type: feature New feature or request

Comments

@dzole0311
Copy link

dzole0311 commented Jul 12, 2024

Does your feature request relate to a specific USWDS component?

Yes, it relates to the Calendar component within the DatePicker: https://github.com/trussworks/react-uswds/blob/5307046f9471215b04a9b33f6150ffab8b71aacc/src/components/forms/DatePicker/Calendar.tsx

What USWDS Version is this feature present in?

All versions.

Is your feature request related to a problem? Please describe.

Currently, the Calendar modes exist as local state. It would be beneficial to have these modes (or at least their default values) passed down as props. This would allow us to display only the MONTH_PICKER mode or the YEAR_PICKER mode as needed, especially after the Calendar gets exported as a standalone component: #2972.

Describe the solution you'd like

Please add a default mode prop to the Calendar component. This prop should allow setting the calendar modes (DAY_PICKER, MONTH_PICKER, YEAR_PICKER).

Additional context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant