1
I have an input in my date form. Whenever the user modifies the date, it will be updated in Django and return another date.
When the user enters the screen, I already bring the date in the following way: 1996-10-01
Input
<input type="date" ng-model="myobject.date" ng-change="updateField()" ng-init="myobject.date = '{{djangoobj.date}}'">
When I try to just put the Django value in the input, it seems that the ng-model
overwrites and leaves everything blank in the field. So I always use NG-INIT to initialize the ng-model
with the value of Django. However, when I try to do this with a date field, I get the following error message:
Expected `1996-10-01` to be a date