소스 검색

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;
           }
         }