Skip to content

Commit

Permalink
Legg til validering på at fra og til dato er satt (#6788)
Browse files Browse the repository at this point in the history
  • Loading branch information
selbekk authored Nov 6, 2024
1 parent 55d967c commit 3cd1e51
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,17 @@ export const NyBehandlingModal = ({
)}
{erDelvisRevurderingToggleAktivert && erRevurdering && steg === 'RE-ENDRET-FORDELING' && (
<Fieldset className={styles.datePickerContainer} legend="Hvilken periode vil du revurdere?">
<DatepickerField name="fom" disabledDays={{ before: null, after: new Date() }} label="Fra og med" />
<DatepickerField
name="fom"
disabledDays={{ before: null, after: new Date() }}
label="Fra og med"
validate={[required]}
/>
<DatepickerField
name="tom"
disabledDays={{ before: new Date(fom), after: new Date() }}
label="Til og med"
validate={[required]}
/>
</Fieldset>
)}
Expand Down

0 comments on commit 3cd1e51

Please sign in to comment.