react-uswds
react-uswds copied to clipboard
fix: validate DatePicker on blur
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 hello! i noticed this is marked Draft. is this PR still being worked on?
yea, I just wanted more feedback first, esp because I also added sending validation to the user