diff --git a/src/date-picker/DateRangePicker.tsx b/src/date-picker/DateRangePicker.tsx index 4fcef0c444..9b987736c0 100644 --- a/src/date-picker/DateRangePicker.tsx +++ b/src/date-picker/DateRangePicker.tsx @@ -40,6 +40,7 @@ const DateRangePicker = forwardRef((origin presetsPlacement, panelPreselection, onPick, + cancelRangeSelectLimit, } = props; const { @@ -354,7 +355,7 @@ const DateRangePicker = forwardRef((origin presetsPlacement, activeIndex, popupVisible, - cancelRangeSelectLimit: props.cancelRangeSelectLimit, + cancelRangeSelectLimit, onCellClick, onCellMouseEnter, onCellMouseLeave, diff --git a/src/date-picker/panel/RangePanel.tsx b/src/date-picker/panel/RangePanel.tsx index c19b85ec67..6d3c0d4951 100644 --- a/src/date-picker/panel/RangePanel.tsx +++ b/src/date-picker/panel/RangePanel.tsx @@ -19,7 +19,7 @@ export interface RangePanelProps extends TdDateRangePickerProps, StyledProps { year?: number[]; month?: number[]; time?: string[]; - cancelRangeSelectLimit: boolean; + cancelRangeSelectLimit?: boolean; onClick?: (context: { e: React.MouseEvent }) => void; onCellClick?: (date: Date, context: { e: React.MouseEvent; partial: 'start' | 'end' }) => void; onCellMouseEnter?: (date: Date, context: { partial: 'start' | 'end' }) => void;