fix: RangeCalendar getEndValue adjust month if date not align condition incorrect, #2256 (#2288)

pull/2275/head
Jy 2020-05-24 22:21:25 +08:00 committed by GitHub
parent e11d04e76e
commit ebb882c129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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')