Skip to content

fix: validate DatePicker on blur #3189

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elijah-wright
Copy link

Summary

this PR fixes the skipped tests in DatePicker.test.tsx by adjusting DatePicker to validate on blur rather than with a useEffect hook, which matches with USWDS. it also sets the aria-invalid attribute and uses reportValidity to send VALIDATION_MESSAGE to the user. this PR also changes some of the tests that were dependent on the useEffect behavior

Related Issues or PRs

none

How To Test

yarn test

@elijah-wright elijah-wright changed the title validate DatePicker on blur fix: validate DatePicker on blur Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant