Skip to content

Commit

Permalink
[TPO-67] hurtig år og måned velger
Browse files Browse the repository at this point in the history
  • Loading branch information
abrhanav committed Sep 25, 2024
1 parent 0db297f commit 7b78a07
Show file tree
Hide file tree
Showing 2 changed files with 433 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,20 @@ function EgendefinertDatoInputs(props: EgendefinertDatoInputsProps) {
return periodeValidering.find((validering) => validering.erUgyldig(fraDato, tilDato))?.feilmelding;
};

const fromDate = dayjs().subtract(50, 'year').startOf('year').toDate();
const toDate = dayjs().toDate();

return (
<>
<DatePickerWrapper>
<DatePicker {...datepickerProps} strategy={'fixed'} locale={'nb'}>
<DatePicker
{...datepickerProps}
strategy={'fixed'}
locale={'nb'}
dropdownCaption={true}
fromDate={fromDate}
toDate={toDate}
>
<HStack wrap gap="4" justify="center">
<DatePicker.Input {...fromInputProps} locale={'nb'} type={'small'} label="Fra" />
<DatePicker.Input {...toInputProps} locale={'nb'} type={'small'} label="Til" />
Expand Down
Loading

0 comments on commit 7b78a07

Please sign in to comment.