Skip to content

Commit

Permalink
Merge pull request ElemeFE#2390 from QingWei-Li/fix/datepicker/value
Browse files Browse the repository at this point in the history
DatePicker: fix null value shows 1970, fixed ElemeFE#2388
  • Loading branch information
baiyaaaaa authored Jan 13, 2017
2 parents 123069d + 92d5522 commit 9898ac4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/date-picker/src/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const toDate = function(date) {
};

export const isDate = function(date) {
date = new Date(date);
if (isNaN(date.getTime())) return false;
if (date === null || date === undefined) return false;
if (isNaN(new Date(date).getTime())) return false;
return true;
};

Expand Down

0 comments on commit 9898ac4

Please sign in to comment.