Why datepicker-popup
doesn't work if the input is disabled? And how can I let it work?
Code:
span.input-group
input.form-control(
type="text"
name="accountDate"
ng-model="account.date"
min-date="minDate"
max-date="maxDate"
datepicker-options="dateOptions"
ng-disabled="true"
uib-datepicker-popup="{{format}}"
is-open="date.isOpen"
close-text="Close"
close-on-date-selection="true"
show-button-bar="false"
)
span.input-group-btn
button.btn.btn-default(
type="button"
ng-click="openDatePicker()")
i.glyphicon.glyphicon-calendar
If I remove ng-disabled
it works as expected. I tried to replace it with disabled
and disabled="disabled"
... not working at all.
I need it to be disabled and if I click on the button it should display the date picker...
A disabled input element is unusable and un-clickable. Source.
Try to use ng-readonly
instead ng-disabled
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments