Skip to content

Commit

Permalink
[fields] Fix MultiInputTimeRangeField section selection (#10922)
Browse files Browse the repository at this point in the history
  • Loading branch information
noraleonte authored Nov 7, 2023
1 parent 42dd75d commit 2a55ca6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export const useMultiInputTimeRangeField = <TDate, TTextFieldSlotProps extends {
onChange,
disabled,
readOnly,
selectedSections,
onSelectedSectionsChange,
} = sharedProps;

const { value, handleValueChange, timezone } = useControlledValueWithTimezone({
Expand Down Expand Up @@ -134,6 +136,8 @@ export const useMultiInputTimeRangeField = <TDate, TTextFieldSlotProps extends {
value: valueProp === undefined ? undefined : valueProp[0],
defaultValue: defaultValue === undefined ? undefined : defaultValue[0],
onChange: handleStartDateChange,
selectedSections,
onSelectedSectionsChange,
};

const endFieldProps: UseTimeFieldComponentProps<
Expand All @@ -151,6 +155,8 @@ export const useMultiInputTimeRangeField = <TDate, TTextFieldSlotProps extends {
value: valueProp === undefined ? undefined : valueProp[1],
defaultValue: defaultValue === undefined ? undefined : defaultValue[1],
onChange: handleEndDateChange,
selectedSections,
onSelectedSectionsChange,
};

const startDateResponse = useTimeField({
Expand Down

0 comments on commit 2a55ca6

Please sign in to comment.