fix DatePicker range setMonth problem

This commit is contained in:
梁灏 2019-12-16 11:49:39 +08:00
parent dd35ff0f8c
commit d4adbdd1a1

View file

@ -296,7 +296,11 @@
},
changePanelDate(panel, type, increment, updateOtherPanel = true){
const current = new Date(this[`${panel}PanelDate`]);
current[`set${type}`](current[`get${type}`]() + increment);
if (panel === 'left') {
current[`set${type}`](current[`get${type}`](), 0);
} else {
current[`set${type}`](current[`get${type}`]() + increment);
}
this[`${panel}PanelDate`] = current;
if (!updateOtherPanel) return;