Skip to content

Commit 86cf867

Browse files
committed
fix(web): remove redundant check
1 parent 14ccd2b commit 86cf867

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/web/src/views/Calendar/components/Draft/hooks/actions/useDraftActions.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -569,21 +569,10 @@ export const useDraftActions = (
569569
}
570570

571571
setDraft((_draft): Schema_GridEvent => {
572-
const result = {
572+
return {
573573
..._draft!,
574574
...(dateChanged ? { [dateChanged]: updatedTime } : {}),
575575
};
576-
577-
// All-day events end the day prior (EG: selected end date is "2020-01-01" but sent end date is "2020-01-02")
578-
// Ensure that we would never have all day events that start and end in the same day, for consistency purposes.
579-
// and less debugging headaches.
580-
if (result.startDate === result.endDate && draft.isAllDay) {
581-
result.endDate = dayjs(result.endDate)
582-
.add(1, "day")
583-
.format("YYYY-MM-DD");
584-
}
585-
586-
return result;
587576
});
588577
},
589578
[

0 commit comments

Comments
 (0)