From 7cbb84f4fdb24cc7d5145a340c8cefdd393b2ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9E=C3=B3r=C3=B0ur=20Hafli=C3=B0ason?= Date: Sun, 29 Sep 2024 19:09:12 +0000 Subject: [PATCH] Update draft impact default date --- .../regulations-admin/src/components/impacts/EditChange.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/portals/admin/regulations-admin/src/components/impacts/EditChange.tsx b/libs/portals/admin/regulations-admin/src/components/impacts/EditChange.tsx index 74ad63186e7b..80e0109d7139 100644 --- a/libs/portals/admin/regulations-admin/src/components/impacts/EditChange.tsx +++ b/libs/portals/admin/regulations-admin/src/components/impacts/EditChange.tsx @@ -56,6 +56,7 @@ import { DraftRegulationChange } from '@island.is/regulations/admin' import { useLocale } from '@island.is/localization' import { cleanTitle } from '@island.is/regulations-tools/cleanTitle' import { errorMsgs as msg } from '../../lib/messages' +import { getWorkdayMinimumDate } from '../../utils' /* ---------------------------------------------------------------------------------------------------------------- */ @@ -197,7 +198,7 @@ export const EditChange = (props: EditChangeProp) => { !regulationLoading && toISODate(minDate) !== toISODate(activeChange.date.value) ) { - changeDate(minDate) + changeDate(getWorkdayMinimumDate(10)) } // eslint-disable-next-line react-hooks/exhaustive-deps }, [minDate, impactsLoading, regulationLoading])