prime-simplereport icon indicating copy to clipboard operation
prime-simplereport copied to clipboard

Date picker validation is broken

Open schreiaj opened this issue 3 months ago • 1 comments

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 min date
  • 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

Kapture 2025-08-27 at 13.51.17.gif

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

schreiaj avatar Sep 04 '25 02:09 schreiaj

Needs design input. @DanielSass to circle back with Ryan.

DavidMcClatchey avatar Sep 15 '25 16:09 DavidMcClatchey