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

Commit

Permalink
fix for when typing invalid date, thanks to @batiskafff
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Jan 20, 2017
1 parent ca2dc47 commit 8cdd3bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/angular-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
}
, unregisterDataSetWatcher = $scope.$watch('dateSet', function dateSetWatcher(newValue) {

if (newValue) {
if (newValue && !isNaN(Date.parse(newValue))) {

date = new Date(newValue);

Expand Down
Loading

0 comments on commit 8cdd3bf

Please sign in to comment.