resolved event create bug

This commit is contained in:
Kyle 2026-02-19 20:44:14 +08:00
parent d5080f59af
commit c5adc316ef

View File

@ -131,9 +131,6 @@ export default function CalendarPage() {
};
const handleDateSelect = (selectInfo: DateSelectArg) => {
// Clear the selection mirror immediately so it doesn't vanish
// jarringly when the user clicks into the form's title field
calendarRef.current?.getApi().unselect();
setSelectedStart(selectInfo.startStr);
setSelectedEnd(selectInfo.endStr);
setSelectedAllDay(selectInfo.allDay);
@ -141,6 +138,7 @@ export default function CalendarPage() {
};
const handleCloseForm = () => {
calendarRef.current?.getApi().unselect();
setShowForm(false);
setEditingEvent(null);
setSelectedStart(null);
@ -169,6 +167,7 @@ export default function CalendarPage() {
editable={true}
selectable={true}
selectMirror={true}
unselectAuto={false}
dayMaxEvents={true}
weekends={true}
eventClick={handleEventClick}