Browse Source

DatePicker:fix month status check Bug

fix month status check Bug
QingDeng 8 năm trước cách đây
mục cha
commit
adf357fb36
1 tập tin đã thay đổi với 2 bổ sung8 xóa
  1. 2 8
      packages/date-picker/src/basic/month-table.vue

+ 2 - 8
packages/date-picker/src/basic/month-table.vue

@@ -78,18 +78,12 @@
           while (date < nextMonth) {
             if (this.disabledDate(date)) {
               date = new Date(date.getTime() + 8.64e7);
+              flag = true;
             } else {
+              flag = false;
               break;
             }
           }
-          // There is a bug of Chrome.
-          // For example:
-          // 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 - nextMonth < 8.64e7) {
-            flag = true;
-          }
         }
 
         style.disabled = flag;