Skip to content

when change from parameters view doesn't change #145

@elia-c

Description

@elia-c

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;
            }
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions