Merge pull request #303 from xrkffgg/k-fix-date

fix: datepicker left picker
This commit is contained in:
Aresn 2020-02-24 09:26:03 +08:00 committed by GitHub
commit b03681fa4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -296,11 +296,7 @@
},
changePanelDate(panel, type, increment, updateOtherPanel = true){
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;
if (!updateOtherPanel) return;