ng只读不禁用angularjs中的日期选择器



即使字段为只读,日期选择器插件仍在工作。

<input name="SpecialFields_{{::field.FieldID}}" ng-model="newUserObj.specialfields[field.FieldID]" type="text" class="DatePickerClass form-control" uib-datepicker-popup="{{format}}" datepicker-localdate is-open="popup.customDate[$index].opened" autocomplete="off" placeholder="e.g. 01-January-2000" datepicker-options="dateOptions" close-text="Close" alt-input-formats="altInputFormats" ng-required="field.RequiredField == 1" ng-readonly="field.AdminEditable && (isAdmin == 0)">

有什么方法可以禁用日期选择器吗

我认为您可能希望使用ng-disabled="field.AdminEditable && (isAdmin == 0)而不是ng-readonly

这将阻止更改。

最新更新