Datepicker not working in ng-repeats
Example plunker: http://plnkr.co/edit/MQzUiooc7mojBH5ivuNC?p=info
Looks like it could be related to other posts: #1381 #2253 #1138
I have the same issue. Date format errors in console occurs.
Trace from console:
TypeError: Cannot read property 'split' of undefined
at createParser (http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.min.js:8:9978)
at parse (http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.min.js:8:10381)
at m (http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.min.js:8:20388)
at k.$render (http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.min.js:8:21812)
at Object.<anonymous> (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:187:45)
at h.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:108:321)
at h.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:111:451)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:18:303
at Object.d [as invoke] (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:34:479)
at c (https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js:18:211)
I dug into this a little and it seems that the format used in parse/createParser is null instead of the default.
Hi, I also get this issue, but outside without ng-repeat, and when setting init-date, when the model is empty.
Same it seems the dateFormat is undefined whent the parser runs...
@cgarvis Here I've modified your plunk that datepicker with ng-repeat works fine
http://plnkr.co/edit/wiMKB3EiXIaDuv84CLHH?p=preview
@andrewdacenko so the change that you made that makes this work is setting the datapicker-popup format and converted the date strings to Date objects?
@cgarvis main changes are in converting dates into Date objects (required for datepickers), format is an option. Also without $event argument in open function example won't work, so you need $event.preventDafault() and $event.stopPropagation()
This appears to not be an issue - we currently only support date objects.
Anyhow, this is not an issue with ng-repeat and the datepicker.
@andrewdacenko Thanks a lot :+1: