title: How to prevent dropdown closing on selecting date?
body: <p>I have textbox in dropdown list for selecting date range but when select date that dropdown closes and again i have to open dropdown and select another date.....
  Here is my code :</p>
  
  <pre><code>&lt;ul class="wrapper" style="z-index: 1"&gt;
  &lt;li&gt;&lt;button style="background: #ededed;"&gt;Transactions&lt;/button&gt;
  &lt;ul id="dropdown" class="content" style="z-index: 1"&gt;
      &lt;li&gt;&lt;a id="a" href="#"&gt;Today's Transactions&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a id="b" href="#"&gt;Last 7 Days Transactions&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a id="c" href="#"&gt;Last 30 Days Transactions&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a&gt;Select Custom Date &lt;br&gt;&lt;br&gt;
       &lt;div style="margin-top: -20px"&gt;
       &lt;date-picker todateid="endDate" fromdateid="startDate"&gt;&lt;/date-picker&gt;
        &lt;span&gt;From:&lt;/span&gt;
        &lt;span style="margin-left: 77px"&gt;To:&lt;/span&gt;&lt;br&gt;
        &lt;input type="text" name="start_date" id="startdate" class="custom-date" readonly="" &gt;
         &lt;span class="dash"&gt;-&lt;/span&gt;
         &lt;input type="text" name="end_date" id="enddate" class="custom-date" readonly=""&gt;
         &lt;input type="button" value="Clear" onclick="clearCalender()" style="height: 25px; width: 50px; margin-left: 125px; margin-top: 5px;"&gt;
         &lt;input type="button" id="d" href="#" value="OK"&gt;
      &lt;/div&gt;&lt;/a&gt;
    &lt;/li&gt;&lt;a&gt;
    &lt;input type="button" name="closeBtn" class="button-trans" value="Close"&gt;
    &lt;/a&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p></p>
  
  <p>Javascript:</p>
  
  <pre><code>$(document).ready(function() {
  // Datepicker Popups calender to Choose date.
      $(function() {
          $("#startdate").datepicker({ maxDate: 0,minDate: '-3m',yearRange: "2015:2015"});
          // Pass the user selected date format.
          $("#format").change(function() 
          {
              $("#enddate").datepicker("option", "dateFormat", $(this).val());
          });
      });
  
      $(function() {
          $("#enddate").datepicker({ maxDate: 0,minDate: '-3m',yearRange: "2015:2015"});
          // Pass the user selected date format.
          $("#format").change(function() 
          {
              $("#startdate").datepicker("option", "dateFormat", $(this).val());         
          });
      });
  });
  </code></pre>
  
  <p>Jquery :
   jquery-ui-1.11.0.js</p>
  
  <p>How can prevent datepicker from closing dropdown?</p>
  
  <p>Example : <a href="http://codepen.io/anon/pen/VejNav" rel="nofollow">http://codepen.io/anon/pen/VejNav</a></p>