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] Export the Calendar component as standalone from DatePicker #2972

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

[feat] Export the Calendar component as standalone from DatePicker #2972

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

Comments

@dzole0311
Copy link

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, it is not possible to use the Calendar component independently without importing the entire DatePicker component. To conditionally render or toggle the Calendar, we must simulate a click on the usa-date-picker__button within the DatePicker (e.g., querySelector('button.usa-date-picker__button').click()), which is a hacky and unreliable approach.

Describe the solution you'd like

Please export the Calendar component as a standalone component, allowing it to be imported and used independently of the DatePicker.

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