瀏覽代碼

DatePicker: fix the panel is not updated when value change, fixed #1158

qingwei.li 8 年之前
父節點
當前提交
2f6750964e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      packages/date-picker/src/panel/date.vue

+ 4 - 0
packages/date-picker/src/panel/date.vue

@@ -228,6 +228,8 @@
           this.$refs.yearTable.nextTenYear();
         } else {
           this.year++;
+          this.date.setFullYear(this.year);
+          this.resetDate();
         }
       },
 
@@ -236,6 +238,8 @@
           this.$refs.yearTable.prevTenYear();
         } else {
           this.year--;
+          this.date.setFullYear(this.year);
+          this.resetDate();
         }
       },