Skip to content

Commit

Permalink
fix(calendar): set dates
Browse files Browse the repository at this point in the history
Set dates on activate if a date is passed
  • Loading branch information
mpfeil committed Mar 5, 2018
1 parent 5c1db33 commit 64a009f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/components/calendar.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@
function activate () {
if (angular.isUndefined(vm.osemStartDate) || angular.equals({}, vm.osemStartDate)) {
vm.textStartDate = vm.osemPlaceholderTextStartDate;
} else {
vm.textStartDate = moment(vm.osemStartDate).format('L');
}
if (angular.isUndefined(vm.osemEndDate) || angular.equals({}, vm.osemEndDate)) {
vm.textEndDate = vm.osemPlaceholderTextEndDate;
} else {
vm.textEndDate = moment(vm.osemEndDate).format('L');
}
}

Expand Down
3 changes: 3 additions & 0 deletions app/components/leaflet.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@
marker.on('dragend', onMarkerDragend);
}
}
setTimeout(function () {
scope.$apply();
});
}
}

Expand Down

0 comments on commit 64a009f

Please sign in to comment.