Define Custom Date Range for Reporting Period
Some organizations have non-standard grant cycles or may need to produce supplementary reports covering irregular windows. The custom date range picker must enforce valid date ranges (start before end, dates not in the future), show a live count of how many activity records will be included, and validate that the selected window meets Bufdir minimum period requirements. The UI should use accessible date pickers that work well with screen readers per WCAG 2.2 AA requirements.
User Story
Acceptance Criteria
- Given the coordinator taps 'Custom Range' on the period selection screen, when the custom date range picker opens, then two accessible date input fields are displayed for start date and end date
- Given the coordinator enters a start date later than the end date, when they attempt to confirm, then an inline validation error is shown and the confirm action is disabled
- Given valid start and end dates are entered, when both fields are filled, then the record count banner updates in real time to reflect the count of activities within that window
- Given the custom range is shorter than the minimum reportable period defined by the report period validator, when the coordinator tries to confirm, then a clear warning message explains the minimum period requirement
- Given the coordinator confirms a valid custom range, when they proceed, then the custom period is saved and passed to the next report generation step
Business Value
Organizations such as HLF operate within Dynamics-portal integration timelines that may not align with calendar quarters. A flexible custom range picker ensures coordinators are never blocked from submitting legally required reports due to date picker constraints, maintaining compliance with Bufdir grant conditions and audit requirements.
Components
- Period Selection Screen ui
- Custom Date Range Picker ui
- Record Count Confirmation Banner ui
- Report Period Validator service
- Period Record Count Service service
- Period Selection BLoC infrastructure