This commit is contained in:
msidolphin 2019-07-29 14:46:11 +08:00
parent 630bc69d97
commit 29a93c3e4d

View file

@ -296,7 +296,11 @@
}, },
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}`](), 0);
} else {
current[`set${type}`](current[`get${type}`]() + increment); current[`set${type}`](current[`get${type}`]() + increment);
}
this[`${panel}PanelDate`] = current; this[`${panel}PanelDate`] = current;
if (!updateOtherPanel) return; if (!updateOtherPanel) return;