Skip to content

Commit

Permalink
Merge pull request #2455 from SpareBank1/develop_bug-datepciker
Browse files Browse the repository at this point in the history
fix(ffe-datepicker-react): set year and month are wrong
  • Loading branch information
pethel authored Dec 19, 2024
2 parents da52d15 + 95c3abc commit 78a0149
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export const DatepickerComp: React.FC<DatepickerCompProps> = ({
min={1}
max={12}
onSpinButtonChange={(newValue, allowFocusNext = true) => {
onChange(`${newValue}.${month}.${year}`);
onChange(`${day}.${newValue}.${year}`);
return allowFocusNext
? setMonth(newValue, () =>
yearRef.current?.focus({
Expand Down Expand Up @@ -323,7 +323,7 @@ export const DatepickerComp: React.FC<DatepickerCompProps> = ({
min={1}
max={9999}
onSpinButtonChange={newValue => {
onChange(`${newValue}.${month}.${year}`);
onChange(`${day}.${month}.${newValue}`);
setYear(newValue);
}}
prevSpinButton={monthRef}
Expand Down

0 comments on commit 78a0149

Please sign in to comment.