title: jQuery Datepicker close datepicker after selected date
body: <p>HTML:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="hero-unit"&gt;
      &lt;input type="text" placeholder="click to show datepicker" id="example1"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
      $('#example1').datepicker({
        format: "dd/mm/yyyy"
      });
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>I use bootstrap datepicker.</p>
  
  <p>When I click to datepicker it opens and I select any date.</p>
  
  <p><strong>My question:</strong></p>
  
  <blockquote>
    <p>If I choose date from datepicker, I want to close datepicker popup.</p>
  </blockquote>
  
  <p>Which event do i need to use in order to close datepicker on select date?</p>
  
  <p><strong>Edited:</strong></p>
  
  <p><strong>I have found a solution</strong></p>
  
  <p>This works</p>
  
  <pre><code> $(document).mouseup(function (e) {
  
          $('#example1').Close();
  
      });
  </code></pre>
  
  <p>But this <strong>below</strong> does not work why ?</p>
  
  <pre><code> $('#example1').datepicker().on('changeDate', function (ev) {
  
          $('#example1').Close();
  
      });
  </code></pre>