Manak Bhardwaj Manak Bhardwaj - 1 year ago 555
AngularJS Question

ngmodel:datefmt expected to be a date in angularjs

I am having this issue in my app

Following is the snippet of my code Code snippet in comments


How i can make the input a ng-model of type date of vm.user as i am having this exception

Please help

Answer Source

I have got the solution for my problem

 `<input type="date" name="dates" id="dates" class="form-control" ng-model="dt" placeholder="yyyy-MM-dd" min="2016-01-01" max="2016-12-31" ng-change="">`

by changing the model value to ISO String helped me resolve the issue

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download