Skip to content

Commit

Permalink
Fix MultiInputTimeRangeField section selection
Browse files Browse the repository at this point in the history
  • Loading branch information
noraleonte committed Nov 6, 2023
1 parent 025f3ba commit d81a0b5
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 d81a0b5

Please sign in to comment.