Skip to content

Commit

Permalink
fix: update the past end date error on date change (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElRodrigote authored Aug 12, 2024
1 parent dd9ce8b commit 90cfae4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/app/components/stackbox/Stackbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,10 @@ export const Stackbox = () => {
<DatePicker
dateTime={endDateTime}
setDateTime={(date: Date) => {
const isEndTimeBeforeStartTime =
date.getTime() <= startDateTime.getTime();

setShowPastEndDateError(isEndTimeBeforeStartTime);
deselectStrategy();
setEndDateTime(date);
}}
Expand Down

0 comments on commit 90cfae4

Please sign in to comment.