-
Notifications
You must be signed in to change notification settings - Fork 81
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 DateRangePicker Component #983
Conversation
- Start date should have a max date of either the specified max start date OR the end date (if selected) - End date should have a min date of either the specified min date OR the start date (if selected)
- Fix prop type collision with 'onChange' prop - Prevent changing the actual signature of the DatePicker, avoiding breaking changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When comparing the rendered markup with the USWDS source, I noticed the USWDS passes these classes along into the DatePicker
components:
usa-date-range-picker__range-start
usa-date-range-picker__range-end
that and the other comments I left are pretty minor. I tested this out on MilMove and it looks great!! nice work 🎉
- Use internal FormGroup and Label Compoents - Pass in range-start and range-end classes to match USWDS
- Populate from label and hint Ids when present - Update tests to check that the airia-describedby property is properly filled.
@suzubara your review prompted me to take a closer look at the generated markup. Looks like I missed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@suzubara same story here. Had to merge main and resolve merge conflicts from main, so this will likely need another approval. Thanks for the reviews! |
Summary
Adds Date Range Picker component
Related Issues or PRs
closes #339
How To Test
Thanks to the CI artifacts, you should be able to simply click "show environments" to access storybook and mess with this new component
Screenshots (optional)