From da9a3b8b3883003db5cabea5e02bd97e562d17e6 Mon Sep 17 00:00:00 2001 From: Eric McDaniel Date: Wed, 12 Feb 2025 13:12:49 -0500 Subject: [PATCH] fix: default date configs to empty; coerce date config fields to date --- core/actions/datacite/action.ts | 4 ++-- core/app/components/forms/elements/DateElement.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/actions/datacite/action.ts b/core/actions/datacite/action.ts index 4ff128f3ce..65d84821c2 100644 --- a/core/actions/datacite/action.ts +++ b/core/actions/datacite/action.ts @@ -15,7 +15,7 @@ export const action = defineAction({ title: z.string(), url: z.string(), publisher: z.string(), - publicationDate: z.date(), + publicationDate: z.coerce.date(), creator: z.string(), creatorName: z.string(), }), @@ -54,7 +54,7 @@ export const action = defineAction({ title: z.string(), url: z.string(), publisher: z.string(), - publicationDate: z.date(), + publicationDate: z.coerce.date(), creator: z.string(), creatorName: z.string(), }), diff --git a/core/app/components/forms/elements/DateElement.tsx b/core/app/components/forms/elements/DateElement.tsx index f6b4dd6be2..c8c86df53e 100644 --- a/core/app/components/forms/elements/DateElement.tsx +++ b/core/app/components/forms/elements/DateElement.tsx @@ -35,7 +35,7 @@ export const DateElement = ({ slug, label, config }: ElementProps{label} field.onChange(date)} /> {config.help}