-
Notifications
You must be signed in to change notification settings - Fork 6.7k
ControllerAs with DatePicker binds strings, not Dates #2899
Comments
Also am having the first problem, the initial date seems to be set in the ngModel.$viewValue as a date-string, Then in the ngModel.$render this $viewValue is passed to the dateFilter in which this non-json-date-string is not parsed and is given back unprocessed. If i adjust the angular dateFilter (jsonStringToDate) to support the Date.toString format aswel... but that feels like a dirty hack. |
I'm running into this issue as well. Have you guys figured out a work around or any particular advice before I pull my ui-datepickers out? |
What versions of Angular/Bootstrap and Bootstrap UI? |
1.3.6 I do believe, bootstrap 3.x and 0.12 of ui, whichever bootstrap ui came with it, but will check on Monday. I just removed controllerAs and I was passed the issue for now. |
I'm not seeing this on current master: http://plnkr.co/edit/lm5z2glUX1a3AauKaVLu?p=preview Has this been potentially fixed? |
@wesleycho yeah looks like @cleftheris committed it. |
Hi all, I made a PR a while back but was not accepted as the solution. There is an alternative solution in the current master that tackles the problem but is still having a bug. Check the discussion for more info #3279. |
This may be related to another 1.3 issue, but when I use code to assign a date to the DatePicker, I get a date string (and it assigns my binding variable to undefined.)
ALSO: dates are messed up -- added 1 day!
See plunkr at http://plnkr.co/edit/TBClYQ7CHKmPL0H3SbB3?p=info
click on the link .. it will show 3-4 date pickers in a loop .. bad date binding....
The text was updated successfully, but these errors were encountered: