Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.