You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two ionic-datepicker object: "start" and "end", I want that when someone change "end" date the start date change his from parameter according to end date minus some months. I create a watch to the value but when I change from parameter the view doesn't change according new value.
$scope.$watch('endDate.inputDate', function (value) {
if (value && $scope.maxMonths){
var newStartDate = new Date(value);
newStartDate.setMonth(newStartDate.getMonth() - $scope.maxMonths);
$scope.startDate.from = newStartDate;
if ($scope.StartDate.inputDate < newStartDate){
$scope.startDate.inputDate = null;
}
}
});
The text was updated successfully, but these errors were encountered:
the reason for this is that the directive has an isolated scope and most scope variables from the controller are loaded once when the directive is created.
I had a similar issue with the label texts. Eventually, I forked the project and "refresh" the labels just before the popup is shown.
I have two ionic-datepicker object: "start" and "end", I want that when someone change "end" date the start date change his from parameter according to end date minus some months. I create a watch to the value but when I change from parameter the view doesn't change according new value.
The text was updated successfully, but these errors were encountered: