Skip to content

Commit

Permalink
fix(ffe-datepicker-react): add the id to input
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Hellstrand committed May 16, 2024
1 parent 7acd631 commit 141eecf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ffe-datepicker-react/src/datepicker/Datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface DatepickerProps {
'aria-invalid'?: React.ComponentProps<'input'>['aria-invalid'];
ariaInvalid?: string | boolean;
calendarAbove?: boolean;
id?: string;
inputProps?: Pick<
React.ComponentPropsWithRef<'input'>,
'ref' | 'className' | 'id' | 'aria-describedby'
Expand Down Expand Up @@ -283,6 +284,7 @@ export class Datepicker extends Component<DatepickerProps, DatepickerState> {
<div className="ffe-datepicker--wrapper">
<DateInput
{...this.props.inputProps}
id={this.props.id}
ariaInvalid={this.ariaInvalid()}
onBlur={this.onInputBlur}
onChange={evt => onChange(evt.target.value)}
Expand Down

0 comments on commit 141eecf

Please sign in to comment.