diff --git a/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/[subsubsectionSlug]/edit.tsx b/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/[subsubsectionSlug]/edit.tsx index 9d0864498..c692b3362 100644 --- a/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/[subsubsectionSlug]/edit.tsx +++ b/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/[subsubsectionSlug]/edit.tsx @@ -43,6 +43,8 @@ const EditSubsubsection = () => { id: subsubsection.id, ...values, trafficLoadDate: values.trafficLoadDate === "" ? null : new Date(values.trafficLoadDate), + estimatedCompletionDate: + values.estimatedCompletionDate === "" ? null : new Date(values.estimatedCompletionDate), }) await setQueryData(updated) await router.push( @@ -97,6 +99,9 @@ const EditSubsubsection = () => { trafficLoadDate: subsubsection.trafficLoadDate ? getDate(subsubsection.trafficLoadDate) : "", + estimatedCompletionDate: subsubsection.estimatedCompletionDate + ? getDate(subsubsection.estimatedCompletionDate) + : "", }} onSubmit={handleSubmit} /> diff --git a/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/new.tsx b/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/new.tsx index f10740be9..271fe2c1f 100644 --- a/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/new.tsx +++ b/src/pages/[projectSlug]/abschnitte/[subsectionSlug]/fuehrung/new.tsx @@ -37,6 +37,10 @@ const NewSubsubsection = () => { subsectionId: subsection!.id, // @ts-ignore trafficLoadDate: values.trafficLoadDate === "" ? null : new Date(values.trafficLoadDate), + // @ts-ignore + estimatedCompletionDate: + // @ts-ignore + values.estimatedCompletionDate === "" ? null : new Date(values.estimatedCompletionDate), }) await router.push( Routes.SubsubsectionDashboardPage({