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

Commit 8cdd3bf

Browse files
committed
fix for when typing invalid date, thanks to @batiskafff
1 parent ca2dc47 commit 8cdd3bf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/angular-datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
}
377377
, unregisterDataSetWatcher = $scope.$watch('dateSet', function dateSetWatcher(newValue) {
378378

379-
if (newValue) {
379+
if (newValue && !isNaN(Date.parse(newValue))) {
380380

381381
date = new Date(newValue);
382382

0 commit comments

Comments
 (0)