Skip to content
This repository was archived by the owner on Feb 14, 2019. It is now read-only.

Commit df971e4

Browse files
Return null if characters are bad
1 parent 6200498 commit df971e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/bootstrap-datetimepicker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,9 @@
15271527
return {separators: separators, parts: parts};
15281528
},
15291529
parseDate: function (date, format, language, type, timezone) {
1530+
if (date && !date.toString().match(this.nonpunctuation)) {
1531+
return null;
1532+
}
15301533
if (date instanceof Date) {
15311534
var dateUTC = new Date(date.valueOf() - date.getTimezoneOffset() * 60000);
15321535
dateUTC.setMilliseconds(0);

0 commit comments

Comments
 (0)