title: How to disable all other date except from selected date in jquery datepicker
body: <p>I have two datepickers named startdate and enddate. I want to disable all other dates except the selected date from startdate.  for example if i selected 15/12/2016 from startdate datepicker then i want to disable all other dates in enddate datepicker except 15th day.</p>
  
  <p>Demofiddle : <a href="https://jsfiddle.net/d7vzxn8s/" rel="nofollow noreferrer">https://jsfiddle.net/d7vzxn8s/</a></p>
  
  <p>This is my code :</p>
  
  <pre><code> &lt;p&gt;Start Date: &lt;input type="text" id="startdate"&gt;&lt;/p&gt;
   &lt;p&gt;End Date: &lt;input type="text" id="enddate"&gt;&lt;/p&gt;
  
   &lt;script&gt;
     $("#startdate").datepicker({
      onSelect: function (selected) {
          var dt = new Date(selected);
          dt.setDate(dt.getDate());
          $("#enddate").datepicker("option", "minDate", dt);
        }
      });
    $("#enddate").datepicker();
  </code></pre>