- onChange(e.target.value)}
- variant="classic"
- fullWidth
- />
+
+ onChange(e.target.value)}
+ variant="classic"
+ fullWidth
+ />
+ {detectedUrl && (
+
+ )}
+
);
};
diff --git a/src/frontend/apps/calendars/src/features/calendar/components/scheduler/hooks/useEventForm.ts b/src/frontend/apps/calendars/src/features/calendar/components/scheduler/hooks/useEventForm.ts
index 664a21b..4805705 100644
--- a/src/frontend/apps/calendars/src/features/calendar/components/scheduler/hooks/useEventForm.ts
+++ b/src/frontend/apps/calendars/src/features/calendar/components/scheduler/hooks/useEventForm.ts
@@ -1,4 +1,4 @@
-import { useCallback, useEffect, useState } from "react";
+import { useCallback, useEffect, useRef, useState } from "react";
import type {
IcsEvent,
IcsAttendee,
@@ -11,6 +11,7 @@ import type {
} from "ts-ics";
import type { EventCalendarAdapter } from "../../../services/dav/EventCalendarAdapter";
import type { AttachmentMeta, EventFormSectionId } from "../types";
+import { cleanEventForDisplay } from "../utils/eventDisplayRules";
import {
formatDateTimeLocal,
formatDateLocal,
@@ -40,6 +41,8 @@ export const useEventForm = ({
const [location, setLocation] = useState("");
const [startDateTime, setStartDateTime] = useState("");
const [endDateTime, setEndDateTime] = useState("");
+ // Stash full datetime strings so toggling all-day off restores the original times
+ const savedDateTimesRef = useRef({ start: "", end: "" });
const [selectedCalendarUrl, setSelectedCalendarUrl] = useState(calendarUrl);
const [isAllDay, setIsAllDay] = useState(false);
const [attendees, setAttendees] = useState