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

Commit 591df69

Browse files
Return null if characters are bad
1 parent 0175948 commit 591df69

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
@@ -1519,6 +1519,9 @@
15191519
return {separators: separators, parts: parts};
15201520
},
15211521
parseDate: function (date, format, language, type, timezone) {
1522+
if (date && !date.toString().match(this.nonpunctuation)) {
1523+
return null;
1524+
}
15221525
if (date instanceof Date) {
15231526
var dateUTC = new Date(date.valueOf() - date.getTimezoneOffset() * 60000);
15241527
dateUTC.setMilliseconds(0);

0 commit comments

Comments
 (0)