Skip to content

Commit

Permalink
Fix date range (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl authored Oct 31, 2024
1 parent 752c7b5 commit d0dc710
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/shared-business/src/components/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ export const isDateInRange =
year: maxDate.getFullYear(),
};

return isDateAfter(date, min) && isDateBefore(date, max);
return (
(isDateAfter(date, min) && isDateBefore(date, max)) ||
isDateEquals(date, min) ||
isDateEquals(date, max)
);
};

const isDateToday = (date: DatePickerDate): boolean => {
Expand Down

0 comments on commit d0dc710

Please sign in to comment.