timepicker: ng-model not undated when set directly without wrapping DIV
When ng-modelset directly in <timepicker>:
<timepicker ng-model="mytime" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></timepicker>
ng-model not updated when clicking on hours/minutes
@vitalets yeh, this is one of those AngularJS scoping oddities that you will have to learn with. Basically in AngularJS each DOM element can be associated with one scope only. Since the <timepicker> directive is creating an isolated scope the ngModel directives is evaluated in the context of this isolated scope. This is what is described in the issue opened for AngularJS: https://github.com/angular/angular.js/issues/1924
The easy workaround is to prefix ngModel expression with $parent:
<timepicker ng-model="$parent.mytime"></timepicker>
I understand that it might be confusing but unfortunately this is not something we can address in this project - it needs to be solved on the AngularJS level, but it is a complex problem so I wouldn't expect it to change overnight.
I am using timepicker angular ui component in my form, After 1 st form submit, when I am submitting 2 nd form it is blank, it only take value if I manually change timepicker.
I am facing an issue with timepicker. Form is not resetting when i click on reset button. But the model is setting to null. data is not clearing off from the form.
<timepicker readonly-input="true" ng-model="issue.closeByTime" show-meridian="false"></timepicker>
In controller
$scope.issue.closeByTime = null;
On UI, HH and MM are still showing although model is null. Can you please help me