I am working on Angular application. I have 2 Angular Datepickers on the page. Right now I am able to open the datepicker popup when i click the datepicker icon and when I focus the field but my requirement is that datepicker popup should be available only when user clicks on calendar icon. I dont want datepicker popup opened on focus of datepicker field.
Assuming you are talking about angular-ui
directives, use the example in the official documentation
<h4>Popup</h4>
<div class="row">
<div class="col-md-6">
<p class="input-group">
<input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2015-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
<span class="input-group-btn">
<button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
</span>
</p>
</div>
</div>
I have used the same code but somehow its opening the datepicker popup when I focus the date field. I dont know how to prevent it to open the popup on the focus.