fix all day events

This commit is contained in:
Milan Paunovic
2024-10-13 15:03:53 +02:00
parent 515b5738bb
commit 0f12296ac6

View File

@ -104,11 +104,8 @@ export const ManuallyAddEventModal = ({
let finalEndDate: Date;
if (isAllDay) {
finalStartDate = new Date(startDate);
finalStartDate.setHours(0, 0, 0, 0);
finalEndDate = new Date(startDate);
finalEndDate.setHours(23, 59, 59, 999);
finalStartDate = new Date(startDate.setHours(0, 0, 0, 0));
finalEndDate = new Date(startDate.setHours(0, 0, 0, 0));
} else {
finalStartDate = combineDateAndTime(startDate, startTime);
finalEndDate = combineDateAndTime(endDate, endTime);