Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #165 from AppliedIS/fix-datefield
Browse files Browse the repository at this point in the history
fix for date fields where bound value was not being loaded properly
  • Loading branch information
jefferey committed Nov 22, 2016
2 parents d154a37 + b6043b3 commit 7139660
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ module.exports = function(ngModule) {
}

$scope.$watch('dateVal', function(newValue, oldValue) {
if(moment.isDate(newValue) && !moment(newValue).isSame(oldValue)) {
if(!newValue) {
vm.year = undefined;
vm.month = undefined;
vm.day = undefined;
} else {
updateLocalScope();
}
});
Expand Down

0 comments on commit 7139660

Please sign in to comment.