diff --git a/packages/v2/gui/src/prosess/vilkar-soknadsfrist/components/SoknadsfristVilkarDokument.tsx b/packages/v2/gui/src/prosess/vilkar-soknadsfrist/components/SoknadsfristVilkarDokument.tsx index 4ca66a573d..0711ae5e0a 100644 --- a/packages/v2/gui/src/prosess/vilkar-soknadsfrist/components/SoknadsfristVilkarDokument.tsx +++ b/packages/v2/gui/src/prosess/vilkar-soknadsfrist/components/SoknadsfristVilkarDokument.tsx @@ -18,6 +18,7 @@ import RadioGroupPanel from '../../../shared/hook-form/RadioGroupPanel'; import type { KravDokument } from '../types/KravDokumentStatus'; import { formatDate } from '../utils'; import styles from './SoknadsfristVilkarDokument.module.css'; +import type { Dayjs } from 'dayjs'; const minLength3 = minLength(3); const maxLength1500 = maxLength(1500); @@ -75,8 +76,8 @@ export const SoknadsfristVilkarDokument = ({ [dokument.innsendingstidspunkt, dokument.journalpostId], ); - const isAtleastDate = useCallback(v => dateAfterOrEqual(minDate)(v), [minDate]); - const isAtmostDate = useCallback(v => dateBeforeOrEqual(maxDate)(v), [maxDate]); + const isAtleastDate = useCallback((v: string | Dayjs | undefined) => dateAfterOrEqual(minDate)(v), [minDate]); + const isAtmostDate = useCallback((v: string | Dayjs | undefined) => dateBeforeOrEqual(maxDate)(v), [maxDate]); const showRedigerVurderingButton = !erOverstyrt && dokumentErVurdert && !redigerVurdering && kanEndrePåSøknadsopplysninger;