title: Disable previous dates of a datepicker according to selected date in javascript or jquery
body: <p>I have two datepickers like startdate and enddate.If i select 18th june 2015 in startdate i have to disable previous dates in datepicker to 18thjune2015 in enddate.</p>
  
  <p>Here is my code.</p>
  
  <pre><code> $("#txtstartdate").datepicker({ minDate: 0 });
  </code></pre>
  
  <p><strong>For end-date:</strong>                         </p>
  
  <pre><code>    var startdate = $("#txtstartdate").val();
      $("#txtenddate").datepicker({ minDate: startdate }); 
  </code></pre>
  
  <p>Its not working. Can anyone pls help me on this.
  thank you.</p>