fix: datepicker left picker

This commit is contained in:
xrkffgg 2020-01-27 21:45:38 +08:00
parent fc027117c7
commit e02490500d

View file

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