我有一个要添加天数的日期值。我的代码在下面,但是不起作用。请帮忙,我想在日期值中添加天数,并以OutDate
18-09-2018
$scope.OutDate = function () {
var InDate = document.getElementById('InDate').value;
$scope.mydate = new Date(InDate); // '16-09-2018' dateformate
$scope.mydate.setDate($scope.mydate.getDate() + 3);
var dt = $filter('date')($scope.mydate, "dd-mm-yyyy");
alert("date plus one day is : " + dt);
}