I'm taking an input type datetime-local
with angularjs and from the controller I get today's date and add one more day and I would like that date to be the minimum date of my input so the user can not choose a lower date to this.
<input type="datetime-local" min="{{fecha_minima.value}}" ng-model="fecha_minima.value">
And in my controller
$scope.fecha_minima = new Date();
$scope.fecha_minima = {
value : new Date($scope.fecha_minima.getFullYear(), $scope.fecha_minima.getMonth(), $scope.fecha_minima.getDate()+1, $scope.fecha_minima.getHours(), $scope.fecha_minima.getMinutes())
};
However this does not work, it allows me to choose dates lower than the one I give, but if I put in the attribute min
a specific date this works, for example min="2016-11-21T00:00:00"
the calendar blocks the previous days.