title: Jquery ui Datepicker maxDate dynamically
body: <p>Good Morning, 
  I'd like to control dynamically the maxDate of my datepicker. For examp. : I have a date on my form on a textbox with value 20/12/12. </p>
  
  <p>I tried this but is not working, the calendar is disabling the maxDate from the date i got on my textbox. Can you please help me with this:</p>
  
  <pre><code>$(function() { 
      var date = new Date(); 
      var m = date.getMonth(), d = date.getDate(), y = date.getFullYear(); 
      $("#Panel2nrFecha").datepicker({ 
          minDate: new Date(y, m, d), 
          maxDate: $("#Panel2nrTextBox1").val(), 
          dateFormat: "dd/mm/y", 
          defaultDate: "+1w", 
          changeMonth: true, 
          numberOfMonths: 3 
      }); 
  }); 
  </code></pre>