// Event form behavior: hide/show the start/end time fields depending on // whether the "All-day event" checkbox is checked. (function initEventForm(): void { const allDay = document.getElementById("all-day") as HTMLInputElement | null; const startTimeField = document.getElementById("start-time-field"); const endTimeField = document.getElementById("end-time-field"); allDay?.addEventListener("change", () => { startTimeField?.classList.toggle("hidden", allDay.checked); endTimeField?.classList.toggle("hidden", allDay.checked); }); })();