Skip to content

Commit f4ff9f1

Browse files
authored
[DateRangePicker] Fix calendarHeader slot props propagation (#13780)
1 parent 528a3da commit f4ff9f1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/x-date-pickers-pro/src/PickersRangeCalendarHeader/PickersRangeCalendarHeader.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ const PickersRangeCalendarHeader = React.forwardRef(function PickersRangeCalenda
4141
minDate,
4242
maxDate,
4343
timezone,
44-
} = props;
44+
// omit props that are not used in the PickersArrowSwitcher
45+
reduceAnimations,
46+
views,
47+
view,
48+
...otherRangeProps
49+
} = other;
4550

4651
const isNextMonthDisabled = useNextMonthDisabled(currentMonth, {
4752
disableFuture,
@@ -65,6 +70,7 @@ const PickersRangeCalendarHeader = React.forwardRef(function PickersRangeCalenda
6570

6671
return (
6772
<PickersRangeCalendarHeaderContentMultipleCalendars
73+
{...otherRangeProps}
6874
ref={ref}
6975
onGoToPrevious={selectPreviousMonth}
7076
onGoToNext={selectNextMonth}

0 commit comments

Comments
 (0)