Skip to content

Commit 78a0149

Browse files
authored
Merge pull request #2455 from SpareBank1/develop_bug-datepciker
fix(ffe-datepicker-react): set year and month are wrong
2 parents da52d15 + 95c3abc commit 78a0149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ffe-datepicker-react/src/datepicker/DatepickerComp.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export const DatepickerComp: React.FC<DatepickerCompProps> = ({
288288
min={1}
289289
max={12}
290290
onSpinButtonChange={(newValue, allowFocusNext = true) => {
291-
onChange(`${newValue}.${month}.${year}`);
291+
onChange(`${day}.${newValue}.${year}`);
292292
return allowFocusNext
293293
? setMonth(newValue, () =>
294294
yearRef.current?.focus({
@@ -323,7 +323,7 @@ export const DatepickerComp: React.FC<DatepickerCompProps> = ({
323323
min={1}
324324
max={9999}
325325
onSpinButtonChange={newValue => {
326-
onChange(`${newValue}.${month}.${year}`);
326+
onChange(`${day}.${month}.${newValue}`);
327327
setYear(newValue);
328328
}}
329329
prevSpinButton={monthRef}

0 commit comments

Comments
 (0)