From 8a1d762996558aeaa974995a0c523bbd9d55946c Mon Sep 17 00:00:00 2001 From: sumin Date: Sun, 16 Nov 2025 03:12:58 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=20=EB=82=A0=EC=A7=9C=20=ED=8F=AC?= =?UTF-8?q?=EB=A7=B7=ED=8C=85(=EC=98=A4=EB=8A=98=20=EB=82=A0=EC=A7=9C?= =?UTF-8?q?=EB=A1=9C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/datePicker/DatePicker.tsx | 20 +++++++++++-------- src/shared/components/set/PopupSet.tsx | 9 +++++++-- src/shared/overlay/Overlay.tsx | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/shared/components/datePicker/DatePicker.tsx b/src/shared/components/datePicker/DatePicker.tsx index 624e4e9..a7a4cb4 100644 --- a/src/shared/components/datePicker/DatePicker.tsx +++ b/src/shared/components/datePicker/DatePicker.tsx @@ -23,9 +23,19 @@ export function DatePicker({ ...calendarProps }: DatePickerProps) { const [open, setOpen] = useState(false); - const [innerDate, setInnerDate] = useState(defaultValue); - const [displayMonth, setDisplayMonth] = useState( + const today = new Date(); + const startOfToday = new Date( + today.getFullYear(), + today.getMonth(), + today.getDate(), + ); + + const [innerDate, setInnerDate] = useState( + defaultValue ?? today +); + + const [displayMonth, setDisplayMonth] = useState( toFirstOfMonth(value ?? innerDate ?? new Date()), ); @@ -56,12 +66,6 @@ export function DatePicker({ setOpen(false); }; - const today = new Date(); - const startOfToday = new Date( - today.getFullYear(), - today.getMonth(), - today.getDate(), - ); return (
diff --git a/src/shared/components/set/PopupSet.tsx b/src/shared/components/set/PopupSet.tsx index de34ac2..00ba003 100644 --- a/src/shared/components/set/PopupSet.tsx +++ b/src/shared/components/set/PopupSet.tsx @@ -20,11 +20,16 @@ export default function PopupSet({ text, onClose }: PopupSetProps) { return ( <> - + { + e.stopPropagation(); + handleClose(); + }} + /> {/* 중앙 고정 */}
diff --git a/src/shared/overlay/Overlay.tsx b/src/shared/overlay/Overlay.tsx index 299d5f5..8dc47ab 100644 --- a/src/shared/overlay/Overlay.tsx +++ b/src/shared/overlay/Overlay.tsx @@ -9,7 +9,7 @@ const Overlay = ({ onClick, opacity = 30, className }: OverlayProps) => {
Date: Sun, 16 Nov 2025 03:16:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat=20:=20=ED=8C=9D=EC=97=85=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/components/set/PopupSet.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/shared/components/set/PopupSet.tsx b/src/shared/components/set/PopupSet.tsx index 00ba003..e41f796 100644 --- a/src/shared/components/set/PopupSet.tsx +++ b/src/shared/components/set/PopupSet.tsx @@ -20,12 +20,7 @@ export default function PopupSet({ text, onClose }: PopupSetProps) { return ( <> - { - e.stopPropagation(); - handleClose(); - }} - /> + {/* 중앙 고정 */}