prime-simplereport
prime-simplereport copied to clipboard
Date picker validation is broken
Acceptance Criteria
-
Begin Date
- Should not be able to select after current date
- Should not be able to select after End date
- Should not be able to enter date less than
mindate
-
End Date
- Should not be able to select after current date
- Should not be able to select before Begin date
May require design input if changing validation logic timing
Description
Verify and correct any user inputs on Dashboard (Analytics.tsx) are properly constrained and validated.
While clicking in the interface is fairly restricted typing in values and using arrow keys is less constrained.
Steps to reproduce
- Set dataRetentionFlag to true
- Navigate to Dashboard
- Select Custom Date Range
- Change date via typing new input OR Change date via arrow keys
Expected Result
- Date range should be restricted to 30 days prior
- Begin must be before ends.
- Ends should not be allowed to be after the current date.
- Violation of these constraints should result in a validation error.
Actual result
Date range may be anything if typed and can be outside the range if using arrow keys
Impact
Unclear behavior - it's an annoyance for the user.
Notes
This is related to how we submit data using the form instantly on change without running checkValidity or reportValidity
Needs design input. @DanielSass to circle back with Ryan.