I am trying to bind an attribute of my model to the local input of dateTime and something is not working properly.
This is my model
$scope.testDate = new Date($.now());
This is my html
<input type="datetime-local" id="exampleInput" name="input" ng-model="testDate" /> value = {{testDate}}
When I launch the application, the dateTime input shows "mm / dd / yyyy, -: -: -" in the input field, but the "value =" part is displayed with the correct DateTime value.
If I enter the correct date in the input field, it will update the value so that the binding works, but something with displaying the initial value does not ...
What am I missing here?
source share