I am trying to bind an attribute of my model to a dateTime-local input 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 start the app the dateTime input shows "mm/dd/yyyy, --:--:--" in the input box, but the "value =" part is displayed with the correct dateTime value.
If i enter a valid date in the input box it will update the value so the binding is working but something with displaying the initial value is not...
What am i missing here?
type="datetime-local"
accept string value, not the real Date object. – World