Commit 92d5522c authored by qingwei.li's avatar qingwei.li

DatePicker: fix null value shows 1970, fixed #2388

parent d5f4603f
...@@ -17,8 +17,8 @@ export const toDate = function(date) { ...@@ -17,8 +17,8 @@ export const toDate = function(date) {
}; };
export const isDate = function(date) { export const isDate = function(date) {
date = new Date(date); if (date === null || date === undefined) return false;
if (isNaN(date.getTime())) return false; if (isNaN(new Date(date).getTime())) return false;
return true; return true;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment