Friday, April 12, 2013

Error: ng-Model value must be a Date object - currently it is a string - use ui-date-format to convert it from a string

you dont neet to wrap the Date object in your controller. just add the value attribute to your input field, and add {{ dateVal | date: 'yyyy-MM-dd' }} to work with angular-ui you need to tell the ui datepicker the same date format, but be carefull, dateformat from angular date filter is not similar to angular ui (jquery ui ) dateformat for example above you need: yy-mm-dd then it works fine. kr Matthias

No comments: