title: How do I set Min Date in Datepicker from another Datepicker?
body: <p>I am currently adding validation to my date pickers and am having trouble setting the min date in the <strong>to</strong> date picker to be whatever was chosen in the <strong>from</strong> date picker. I.e if 12-3-15 is selected then the minimum date in the to date picker is 12-3-15. Here is the code I am using:</p>
  
  <pre><code>$("#from").datepicker({
              defaultDate: new Date(),
              minDate: new Date(),
              onSelect: function(dateStr) 
              {
              fromDate = new Date(dateStr);
              }
          });
  
  $('#to').datepicker({
              defaultDate: new Date(),
              minDate: ("#from" + "1D"), (&lt;- HERE)
              onSelect: function(dateStr) {
              toDate = new Date(dateStr);
  
                  // Converts date objects to appropriate strings
                  fromDate = ConvertDateToShortDateString(fromDate);
                  toDate = ConvertDateToShortDateString(toDate);
          });
  </code></pre>
  
  <p>Does anybody know how I could achieve this?</p>