Skip to content

Commit 8f59331

Browse files
authored
Merge pull request #1436 from data-driven-forms/pf4-date-picker
fix(pf4): fix date and time picker change attributes order
2 parents a2bbd24 + c05811a commit 8f59331

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)