From 8de86aac28c38fc4fb8d34eca04e0ce50b6ab13e Mon Sep 17 00:00:00 2001 From: en Date: Mon, 10 Mar 2025 09:44:09 +0000 Subject: [PATCH] fix(marks): date input --- src/components/MarkTypeStrategy/DateTime/Input.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/MarkTypeStrategy/DateTime/Input.tsx b/src/components/MarkTypeStrategy/DateTime/Input.tsx index fa68438..b2e864c 100644 --- a/src/components/MarkTypeStrategy/DateTime/Input.tsx +++ b/src/components/MarkTypeStrategy/DateTime/Input.tsx @@ -6,10 +6,9 @@ export const MarkInputDateTime = ({ handler, placeholder }: MarkInputProps) => { const ref = useRef(null) useEffect(() => { if (ref.current) { - ref.current.value = new Date().toISOString().slice(0, 16) - if (ref.current.valueAsDate) { - handler(ref.current.valueAsDate.toUTCString()) - } + const date = new Date() + ref.current.value = date.toISOString().slice(0, 16) + handler(date.toUTCString()) } }, [handler]) return (