瀏覽代碼

Update month-table.vue

杨奕 8 年之前
父節點
當前提交
c7ce5c78ce
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      packages/date-picker/src/basic/month-table.vue

+ 1 - 3
packages/date-picker/src/basic/month-table.vue

@@ -87,9 +87,7 @@
           // var date = new Date('1988-04-01 00:00:00') Fri Apr 01 1988 00:00:00 GMT+0800 (CST)
           // date.setMonth(4) Sun May 01 1988 00:00:00 GMT+0900 (CDT)
           // Sometimes the time zone will change.
-          if (date.getFullYear() === nextMonth.getFullYear() &&
-            date.getMonth() === nextMonth.getMonth() &&
-            date.getDate() === nextMonth.getDate()) {
+          if (date - nextMonth < 8.64e7) {
             flag = true;
           }
         }