Skip to content

Commit

Permalink
Merge pull request #652 from ferishili/issue-636
Browse files Browse the repository at this point in the history
Fix MUI error when selecting a date as for StartDate filter
  • Loading branch information
Arnei authored Jun 6, 2024
2 parents be3b60e + c5b13fd commit a957f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/shared/TableFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ const FilterSwitch = ({
autoFocus={true}
inputRef={startDateRef}
className="small-search start-date"
value={startDate}
value={startDate ?? null}
format="dd/MM/yyyy"
onChange={(date) => handleDate(date as Date | null, true)}
// FixMe: onAccept does not trigger if the already set value is the same as the selected value
Expand All @@ -493,7 +493,7 @@ const FilterSwitch = ({
<DatePicker
inputRef={endDateRef}
className="small-search end-date"
value={endDate}
value={endDate ?? null}
format="dd/MM/yyyy"
onChange={(date) => handleDate(date as Date | null)}
// FixMe: See above
Expand Down

0 comments on commit a957f74

Please sign in to comment.