From d566edd9d6942e05c6b4f5560f0c1b90f3bc92bb Mon Sep 17 00:00:00 2001 From: "DESKTOP-TKLFCPR\\ython" Date: Sun, 5 Jul 2026 08:43:18 +0900 Subject: [PATCH] =?UTF-8?q?feat(ux):=20=EB=82=A0=EC=A7=9C=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20=EC=BA=98=EB=A6=B0=EB=8D=94=20=EC=A0=84=ED=99=98=20?= =?UTF-8?q?-=20=EC=9D=BC=EC=A0=95=EB=93=B1=EB=A1=9D=20datetime-local=20(su?= =?UTF-8?q?rgical,=20=EC=BA=98=EB=A6=B0=EB=8D=94=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EB=A7=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- frontend/src/pages/uiws/ScheduleCalendar.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/uiws/ScheduleCalendar.tsx b/frontend/src/pages/uiws/ScheduleCalendar.tsx index 5a03426..f9abbab 100644 --- a/frontend/src/pages/uiws/ScheduleCalendar.tsx +++ b/frontend/src/pages/uiws/ScheduleCalendar.tsx @@ -84,16 +84,22 @@ export default function ScheduleCalendar() { ) } +// datetime-local(yyyy-MM-ddTHH:mm) → API 계약(yyyy-MM-ddTHH:mm:ss) 보정: 초 없으면 :00 부가 +function toApiDt(v: string): string { + if (!v) return v + return v.length === 16 ? `${v}:00` : v +} + function ScheduleForm({ date, type, onClose, onSaved }: { date: string; type: string; onClose: () => void; onSaved: () => void }) { const [title, setTitle] = useState('') - const [startDt, setStartDt] = useState(`${date}T09:00:00`) - const [endDt, setEndDt] = useState(`${date}T18:00:00`) + const [startDt, setStartDt] = useState(`${date}T09:00`) + const [endDt, setEndDt] = useState(`${date}T18:00`) const [content, setContent] = useState('') const [err, setErr] = useState('') const save = async () => { setErr('') try { - await createSchedule({ scheType: type, title, startDt, endDt, content, attachmentIds: [] }) + await createSchedule({ scheType: type, title, startDt: toApiDt(startDt), endDt: toApiDt(endDt), content, attachmentIds: [] }) onSaved() } catch (e: any) { setErr(e?.response?.data?.message || '저장 실패') } } @@ -101,8 +107,8 @@ function ScheduleForm({ date, type, onClose, onSaved }: { date: string; type: st }> - - + + {err &&
{err}
}