Skip to content

Commit c05811a

Browse files
committed
fix(pf4): fix date and time picker change attributes order
1 parent a2bbd24 commit c05811a

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

packages/pf4-component-mapper/src/date-picker/date-picker.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ const DatePicker = (props) => {
1919
id={id || input.name}
2020
FormGroupProps={FormGroupProps}
2121
>
22-
<PF4DatePicker {...input} {...rest} id={id || input.name} isDisabled={isDisabled || isReadOnly} />
22+
<PF4DatePicker
23+
{...input}
24+
onChange={(_e, value) => input.onChange(value)}
25+
{...rest}
26+
id={id || input.name}
27+
isDisabled={isDisabled || isReadOnly}
28+
/>
2329
</FormGroup>
2430
);
2531
};

packages/pf4-component-mapper/src/time-picker/time-picker.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ const TimePicker = (props) => {
1919
id={id || input.name}
2020
FormGroupProps={FormGroupProps}
2121
>
22-
<PF4TimePicker {...input} time={input.value ? input.value : undefined} {...rest} id={id || input.name} isDisabled={isDisabled || isReadOnly} />
22+
<PF4TimePicker
23+
{...input}
24+
onChange={(_e, value) => input.onChange(value)}
25+
time={input.value ? input.value : undefined}
26+
{...rest}
27+
id={id || input.name}
28+
isDisabled={isDisabled || isReadOnly}
29+
/>
2330
</FormGroup>
2431
);
2532
};

0 commit comments

Comments
 (0)