title: How to close datetimepicker after date selection?
body: <p>I am using <a href="http://eonasdan.github.io/bootstrap-datetimepicker/Functions/" rel="nofollow">datetimepicker</a></p>
  
  <p>I cant figure out how to close the widget once I have selected a date value.</p>
  
  <p>My code:</p>
  
  <pre><code>    $(settings.target).datetimepicker({
          useCurrent: "hour",
          minDate: settings.minDate,
          maxDate: settings.maxDate,
          keepOpen : false,
          locale: settings.locale
      });
  
     $(settings.target).on("dp.change", function (e) {
         $(settings.target).trigger("dp.hide");
      })
  
      $(settings.target + " .action").on("focus", function (e) {
          $(this).next().trigger("click");
      })
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>                    &lt;div class="row filterRes"&gt;
                          &lt;div class='col-sm-6'&gt;
                              &lt;div class="form-group"&gt;
                                  &lt;div class='input-group date' id='datetimepickerFrom'&gt;
                                      &lt;input type='text' class="form-control action" placeholder="Från" /&gt;
                                      &lt;span class="input-group-addon"&gt;
                                          &lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;
                                      &lt;/span&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class='col-md-6'&gt;
                              &lt;div class="form-group"&gt;
                                  &lt;div class='input-group date' id='datetimepickerTo'&gt;
                                      &lt;input type='text' class="form-control action" placeholder="Till" /&gt;
                                      &lt;span class="input-group-addon"&gt;
                                          &lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;
                                      &lt;/span&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>Tried several other attempts but cant figure tis out.
  How do I do this?</p>