fix DatePicker problem

This commit is contained in:
梁灏 2021-09-07 11:35:56 +08:00
parent 03a04a2690
commit 588161a020

View file

@ -298,7 +298,10 @@
const current = new Date(this[`${panel}PanelDate`]); const current = new Date(this[`${panel}PanelDate`]);
// fix https://github.com/view-design/ViewUI/issues/418 // fix https://github.com/view-design/ViewUI/issues/418
// 1 // 1
current[`set${type}`](current[`get${type}`]() + increment, 1); // FullYear https://github.com/iview/iview/issues/6600
if (type === 'FullYear') current[`set${type}`](current[`get${type}`]() + increment);
else current[`set${type}`](current[`get${type}`]() + increment, 1);
this[`${panel}PanelDate`] = current; this[`${panel}PanelDate`] = current;
if (!updateOtherPanel) return; if (!updateOtherPanel) return;