From ebb882c129ca15516178145c08e5dba37bef1ffb Mon Sep 17 00:00:00 2001 From: Jy <1041207253@qq.com> Date: Sun, 24 May 2020 22:21:25 +0800 Subject: [PATCH] fix: RangeCalendar getEndValue adjust month if date not align condition incorrect, #2256 (#2288) --- components/vc-calendar/src/RangeCalendar.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/vc-calendar/src/RangeCalendar.jsx b/components/vc-calendar/src/RangeCalendar.jsx index 80ea948f7..05e3cce20 100644 --- a/components/vc-calendar/src/RangeCalendar.jsx +++ b/components/vc-calendar/src/RangeCalendar.jsx @@ -435,7 +435,7 @@ const RangeCalendar = { const newValue = [sValue[0], value || sValue[1]]; this.__emit('panelChange', newValue, newMode); const newState = { - sPanelTriggerSource: 'start', + sPanelTriggerSource: 'end', }; if (!hasProp(this, 'mode')) { newState.sMode = newMode; @@ -494,7 +494,7 @@ const RangeCalendar = { // Adjust month if date not align if ( !showTimePicker && - panelTriggerSource !== 'end' && + panelTriggerSource === 'start' && mode[0] === 'date' && mode[1] === 'date' && endValue.isSame(value[0], 'month')