I've got a form with two controls: simple input field and Angular UI datepicker control: http://angular-ui.github.io/bootstrap/#/datepicker
The idea is to prevent user from editing the date in some cases (for example, when the date is in the past) but still allow to adjust the input field value, and then submit the form.
However, the control has the check ngModelCtrl.$setValidity('date-disabled', !date || (this.element && !this.isDisabled(date)));
, so in case the date editor is disabled, the form becomes invalid.
Is it a bug, or something standard for Angular? Is tehre a reason for such behavior, and how can the scenario described above be implemented?