-
Notifications
You must be signed in to change notification settings - Fork 207
ngModel don't updated in controller #122
Comments
Hello @sebrojas14. I'm just doing research on migrating from AngularJS 1.2 to 1.3. This sounds like it could be the reason. https://code.angularjs.org/1.3.14/docs/guide/migration
code from the uiDate directive:
|
I'm having the same problem. I would like to set a default in the controller and it is not working. |
Having same issue. only applies when the 'dateFormat' options is specified. |
I could be misunderstanding the problem, but the code in https://github.com/alexanderchan/ui-date/blob/issue-dateformat/demo/index.html appears to work with the recent beta release and up to date angular libraries. |
Same here and kinda fucked up my forms :( |
Same problem here. I am using format of YYYY-MM-DD, which works fine, but model doesn't get updated. |
Hopefully this is helpful because I was having the same issue. I've also had this issue with angularjs' select when using ng-options. If you change
to
the ngModel should recognize and update accordingly. At least it has worked for me. |
I believe this is an issue related to a scope issue. Having a |
I tried setting unique "id" for each date picker instances. And it worked. |
I'm using ui-date with ng-model, and in the view the value is changed but in the controller remains undefined or with the value I use to initialize it:
Controller:
$scope.day = new Date;
$scope.dateOptions = {
minDate: '0',
dateFormat: 'yy-mm-dd'
};
$scope.checkSchedule = function () {
};
View:
{{day}}When I change the selected value, it's reflected in view (I have {{day}} after the datepiccker to see it). But when I submit the form, the value it's in today (because I inicialized as a new Date). And if I remove the inicilization, the value in the submit is undefined
The text was updated successfully, but these errors were encountered: