From c05811ac3eda0448ea5af36ff17ae33cc0143d7c Mon Sep 17 00:00:00 2001 From: Martin Marosi Date: Mon, 8 Jan 2024 09:37:15 +0100 Subject: [PATCH] fix(pf4): fix date and time picker change attributes order --- .../pf4-component-mapper/src/date-picker/date-picker.js | 8 +++++++- .../pf4-component-mapper/src/time-picker/time-picker.js | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/pf4-component-mapper/src/date-picker/date-picker.js b/packages/pf4-component-mapper/src/date-picker/date-picker.js index 594618b1b..fdfe0d131 100644 --- a/packages/pf4-component-mapper/src/date-picker/date-picker.js +++ b/packages/pf4-component-mapper/src/date-picker/date-picker.js @@ -19,7 +19,13 @@ const DatePicker = (props) => { id={id || input.name} FormGroupProps={FormGroupProps} > - + input.onChange(value)} + {...rest} + id={id || input.name} + isDisabled={isDisabled || isReadOnly} + /> ); }; diff --git a/packages/pf4-component-mapper/src/time-picker/time-picker.js b/packages/pf4-component-mapper/src/time-picker/time-picker.js index 93e72c746..7d8625021 100644 --- a/packages/pf4-component-mapper/src/time-picker/time-picker.js +++ b/packages/pf4-component-mapper/src/time-picker/time-picker.js @@ -19,7 +19,14 @@ const TimePicker = (props) => { id={id || input.name} FormGroupProps={FormGroupProps} > - + input.onChange(value)} + time={input.value ? input.value : undefined} + {...rest} + id={id || input.name} + isDisabled={isDisabled || isReadOnly} + /> ); };