opengovsg/design-system

Bug: DateRangePicker - Second input resets and filter is applied when first input is being edited

khaleedah opened this issue · 0 comments

Describe the bug
Context: The ScamShield SPF dashboard is using DateRangePicker component from the design system
When the first input is undefined, but the second input is defined, clicking into the first input again loads all the data.

To Reproduce
Steps to reproduce the behavior:

  1. Type in a date into the second input on datepicker.
  2. Click away out of datepicker
  3. Click into the first input of datepicker
  4. Datepicker loads all the data, even though second input is defined

Expected behavior
DateRangePicker should retain existing range even if user is clicking into the first input

Bug Behaviour video
(volume on for explanation lol)

Screen.Recording.2023-04-14.at.12.56.27.PM.mov
Screen.Recording.2023-04-14.at.12.59.53.PM.mov

Expected behaviour video

Screen.Recording.2023-04-14.at.12.57.19.PM.mov
Screen.Recording.2023-04-14.at.1.00.26.PM.mov