I wanted to disable a div section using ng-disabled, but it dint work. I’ve also tried using fieldset in place of div.
ng-disabled seems not working.
Below is the view part
<div ng-disabled="model.disableDate">
<div>Date</div>
<div ion-datetime-picker ng-model="model.timeEntryDate" ng-change="onTimeEntryDateChange()"
date="true" time="false" monday-first="true" am-pm="true">
<i class="icon ion-ios-calendar-outline"></i>
</div>
</div>
This is the controller part
if ($scope.model.pageState === condition) {
$scope.model.disableDate = true;
}
Any way this calender is being popped even on the disabling condition.
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/06/disabling-a-div-in-angularjs-using-ng-disabled/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment