From 0c6486629af7962784d609573f88686c789bc647 Mon Sep 17 00:00:00 2001 From: aleckvincent Date: Tue, 10 Dec 2024 16:50:20 +0100 Subject: [PATCH] use useDate hook --- .../common/hooks/use-mission-general-informations-form.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/v2/features/common/hooks/use-mission-general-informations-form.tsx b/frontend/src/v2/features/common/hooks/use-mission-general-informations-form.tsx index 7374752f..4f602bd5 100644 --- a/frontend/src/v2/features/common/hooks/use-mission-general-informations-form.tsx +++ b/frontend/src/v2/features/common/hooks/use-mission-general-informations-form.tsx @@ -1,7 +1,7 @@ import { FieldProps } from 'formik' -import { postprocessDateFromPicker, preprocessDateForPicker } from '@common/components/elements/dates/utils.ts' import { useAbstractFormikSubForm } from './use-abstract-formik-sub-form.tsx' import { MissionULAMGeneralInfoInitial } from '../types/mission-types.ts' +import { useDate } from './use-date.tsx' export type MissionULAMGeneralInfoInitialInput = MissionULAMGeneralInfoInitial export function useMissionGeneralInformationsForm( @@ -9,6 +9,8 @@ export function useMissionGeneralInformationsForm( fieldFormik: FieldProps ) { + const { preprocessDateForPicker, postprocessDateFromPicker } = useDate() + const fromFieldValueToInput = (data: MissionULAMGeneralInfoInitial) => { return {