Forráskód Böngészése

DatePicker: fix toDate, fixed #2538

qingwei.li 8 éve
szülő
commit
1f53559c20
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      packages/date-picker/src/util/index.js

+ 1 - 1
packages/date-picker/src/util/index.js

@@ -13,7 +13,7 @@ export const equalDate = function(dateA, dateB) {
 };
 
 export const toDate = function(date) {
-  return isDate(date) ? date : null;
+  return isDate(date) ? new Date(date) : null;
 };
 
 export const isDate = function(date) {