Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
foyarash committed Nov 20, 2023
1 parent 97c4471 commit 752ada7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 752ada7

Please sign in to comment.