I have a problem when I try to recieve the value from ngModel in my controller. The ngModel works since it sends the value to my input when the page loads, but when I change the input value the ngModel variable turns undefined.
<input ondrop="return false" maxlength="10" type="text" class="form-
control" date-format="dd/MM/yyyy" bs-datepicker ng-
model="vm.fechaInicio" onpaste="return false" oncut="return false"
oncopy="return false" placement="auto bottom" container="body"
autoclose="true" />
vm.especialidad = {};
vm.fechaInicio = moment();
The version of AngularJS is v1.5.9 and angular-strap is v2.3.12
I managed to work it out, the problem was that I used this in the controller and not $scope. Also I had to remove maxlength from the input.
Thanks for the reply Adrian Smith, I managed to work it out, the problem was that I used "this" in the controller and not $scope. Also I had to remove maxlength from the input.