Skip to content

Commit c323015

Browse files
committed
Fix date parser
1 parent 8c6682a commit c323015

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/validators/date.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ function isValid(data, model) {
1414
if (data instanceof Date) {
1515
return true;
1616
}
17+
1718
// Try to parse data to Date;
1819
var date = Date.parse(data);
19-
if (!isNaN()) {
20+
if (!isNaN(date)) {
2021
data = new Date(date);
2122
return true;
2223
}
2324

24-
2525
return false;
2626
}
2727

0 commit comments

Comments
 (0)