i am trying to Disable the Bootstrap Date picker by adding the property disable="true", text-box is now disabled. when clicking on text-box the date picker still works how can i fix this issue.
HTML
<div class="input-group" id="DateDemo">
<input type="text" id="txtPatientDOB" name="dd" data-format="MM/DD/YYYY" placeholder="DOB" class="form-control" disabled="disabled" /> <span class="input-group-btn">
<button class="btn btn-green" type="button"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
</div>
JS
$("#txtPatientDOB").attr("disabled", true);
Try this :
Set date-disabled to "'true'" (all dates unclickable) and show-button-bar to "'false'" (buttons not visible).
<label>Date</label>
<p class="input-group">
<input type="text" class="form-control" ng-model="dt"
datepicker-popup="MM-dd-yyyy" is-open="opened" close-text="Close"
show-weeks="true" show-button-bar="'false'" date-disabled="'true'" disabled />
<span class="input-group-btn">
<button class="btn btn-disabled" ng-click="open()">
<i class="glyphicon glyphicon-calendar"></i>
</button>
</span>
</p>
or Try setting Disabled property to true :
$("#Date").prop('disabled', true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With