From 95c3abcb8d5472d5fda2ef05f8acb3998c174597 Mon Sep 17 00:00:00 2001 From: Peter Hellstrand Date: Thu, 19 Dec 2024 12:02:22 +0100 Subject: [PATCH] fix(ffe-datepicker-react): set year and month are wrong --- .../ffe-datepicker-react/src/datepicker/DatepickerComp.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ffe-datepicker-react/src/datepicker/DatepickerComp.tsx b/packages/ffe-datepicker-react/src/datepicker/DatepickerComp.tsx index 0b72069591..c9ba3630b5 100644 --- a/packages/ffe-datepicker-react/src/datepicker/DatepickerComp.tsx +++ b/packages/ffe-datepicker-react/src/datepicker/DatepickerComp.tsx @@ -288,7 +288,7 @@ export const DatepickerComp: React.FC = ({ min={1} max={12} onSpinButtonChange={(newValue, allowFocusNext = true) => { - onChange(`${newValue}.${month}.${year}`); + onChange(`${day}.${newValue}.${year}`); return allowFocusNext ? setMonth(newValue, () => yearRef.current?.focus({ @@ -323,7 +323,7 @@ export const DatepickerComp: React.FC = ({ min={1} max={9999} onSpinButtonChange={newValue => { - onChange(`${newValue}.${month}.${year}`); + onChange(`${day}.${month}.${newValue}`); setYear(newValue); }} prevSpinButton={monthRef}