diff --git a/packages/next-admin/src/components/inputs/DateTimeWidget.tsx b/packages/next-admin/src/components/inputs/DateTimeWidget.tsx index be80e9b2..2e32f181 100644 --- a/packages/next-admin/src/components/inputs/DateTimeWidget.tsx +++ b/packages/next-admin/src/components/inputs/DateTimeWidget.tsx @@ -23,7 +23,7 @@ export default function DateTimeWidget< const BaseInputTemplate = getTemplate<'BaseInputTemplate', T, S, F>('BaseInputTemplate', registry, options); const hiddenValue = useMemo(() => { - return new Date(value).toISOString() + return value ? new Date(value).toISOString() : new Date().toISOString() }, [value]) return (