How can I set the default date in the datetime-local field?
This is my HTML :
<div class="col-lg-12 photo-container" ng-repeat="photo in selectedPhotos track by $index" ng-if="add">
<input id="myDate" type="datetime-local" name="date[]" ng-model="form.date[$index]">
<img ng-src="{{photo}}" class="thumb">
</div>
I tried to set the default date in the controller for ng-model, i.e.
$scope.form.date[0] = $filter("date")(Date.now(), 'dd-MM-yyyy HH:mm');
but it doesnt work.
So, How can I set the default date for each input?
The main point is that the date should be set for every $index