Explorar o código

DatePicker: fix toDate, fixed #2538

qingwei.li %!s(int64=8) %!d(string=hai) anos
pai
achega
1f53559c20
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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) {