Skip to content

Commit 840f6d5

Browse files
committed
fix: showTime with range value
1 parent 0249ea9 commit 840f6d5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/RangePicker.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,18 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
624624
panelHoverRangedValue = hoverRangedValue;
625625
}
626626

627+
const panelShowTime = showTime;
628+
if (
629+
panelShowTime &&
630+
typeof panelShowTime === 'object' &&
631+
panelShowTime.defaultValue
632+
) {
633+
panelShowTime.defaultValue = getValue(
634+
panelShowTime.defaultValue,
635+
activePickerIndex,
636+
);
637+
}
638+
627639
return (
628640
<RangeContext.Provider
629641
value={{
@@ -636,6 +648,7 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
636648
<PickerPanel<DateType>
637649
{...(props as any)}
638650
{...panelProps}
651+
showTime={panelShowTime}
639652
mode={mergedModes[activePickerIndex]}
640653
generateConfig={generateConfig}
641654
style={undefined}

0 commit comments

Comments
 (0)