title: Setting max date jquery datepicker
body: <p>I'm having a hard time setting the max date of the jquery datepicker. I want to add thirty days to the min date. </p>
  
  <p>I get my date in dd.mm.yyyy format. I split the date and make a Date object to use this as mindate (this works). My problem is that I cant use '+30D' on the maxdate property, and I have also tried making a second date object as my maxdate without any effect.</p>
  
  <p>My current code that does not work:</p>
  
  <pre><code>        var values = validdate.split(".");
          var parsed_date = new Date(values[2], values[1], values[0]);
  
          var maxdate = new Date();
          maxdate.setDate(parsed_date.getDate() + 30);
  
          $("#date").datepicker({
              changeMonth: true,
              changeYear: true,
              minDate: parsed_date,
              maxDate: maxdate
          });
  </code></pre>