title: jQuery datepicker on click of icon
body: <p>I want to show the jQuery datepicker on click of a FontAwesome icon which is inside the input field. Below is the code:</p>
  
  <pre><code>&lt;div class="col-md-4 col-sm-4 col-xs-12"&gt;
    &lt;label for="datepicker"&gt;Date of birth*&lt;/label&gt;
    &lt;input type="text" name='datepicker' class="form-control"  value="Select date" id="datepicker" ng-required="true" placeholder="MM/DD/YYYY" &gt;
    &lt;span class="fa fa-calendar"&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>jQuery('.fa-calendar').on('click' , function() {
    jQuery(this).datepicker().trigger('focus');
  });
  </code></pre>