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; let finalEndDate: Date;
if (isAllDay) { if (isAllDay) {
finalStartDate = new Date(startDate); finalStartDate = new Date(startDate.setHours(0, 0, 0, 0));
finalStartDate.setHours(0, 0, 0, 0); finalEndDate = new Date(startDate.setHours(0, 0, 0, 0));
finalEndDate = new Date(startDate);
finalEndDate.setHours(23, 59, 59, 999);
} else { } else {
finalStartDate = combineDateAndTime(startDate, startTime); finalStartDate = combineDateAndTime(startDate, startTime);
finalEndDate = combineDateAndTime(endDate, endTime); finalEndDate = combineDateAndTime(endDate, endTime);