From 796b2e3396ba694c8dc26163a9b1ff0823eb04a4 Mon Sep 17 00:00:00 2001 From: vovh <155978769+vovh@users.noreply.github.com> Date: Thu, 3 Oct 2024 11:03:09 +0200 Subject: [PATCH] fix(kms): fix unexpected error on datepicker in credential creation (#13373) ref: MANAGER-15441 Signed-off-by: Vincent BONMARCHAND --- .../generalInformations/CreateGeneralInformationsValidity.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/manager/apps/key-management-service/src/pages/credential/create/generalInformations/CreateGeneralInformationsValidity.tsx b/packages/manager/apps/key-management-service/src/pages/credential/create/generalInformations/CreateGeneralInformationsValidity.tsx index dababc56da6c..2f90a76c7965 100644 --- a/packages/manager/apps/key-management-service/src/pages/credential/create/generalInformations/CreateGeneralInformationsValidity.tsx +++ b/packages/manager/apps/key-management-service/src/pages/credential/create/generalInformations/CreateGeneralInformationsValidity.tsx @@ -54,6 +54,7 @@ const CreateGeneralInformationsValidity = ({ if (validityPresetPeriod !== -1) { setValidity(validityPresetPeriod); } else { + if (!validityDatepicker) return; setValidity(getDaysFromDate(validityDatepicker)); } }, [validityPresetPeriod, validityDatepicker]);