Skip to content

Commit

Permalink
added documentation for datefilter function
Browse files Browse the repository at this point in the history
  • Loading branch information
SGupta101 committed Nov 18, 2023
1 parent b65d18c commit 2014de4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/components/AnalyticsTable/DateFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ type DateFilterProps = {
onSubmit: (startDate: string, endDate: string) => void;
};

/*
The DateFilter component facilitates the selection of a valid date range through
two input fields for start and end dates. It dynamically updates error messages
based on user input, ensuring that the chosen start date is before or on the end date.
The component utilizes React state to manage date inputs and provides accessibility
features for screen readers. The "Apply Dates" button triggers the onSubmit callback
only when there are no validation errors, passing the selected start and end dates
for further handling.
*/

const DateFilter = ({
initStartDate,
initEndDate,
Expand Down

0 comments on commit 2014de4

Please sign in to comment.