title: How can I check that a selected date is within a 30 day period?
body: <p>I'm trying to validate that the selected date is within 30 days of today's date. How can I do this in jQuery? Here's what I have so far:</p>
  
  <pre><code>&lt;input type="text" id="txtMaxDate" /&gt;
  &lt;input type="submit" onclick="validateMaxDate();" /&gt;
  
  &lt;script type="text/javascript"&gt;
      function validateMaxDate() {
      // format of sendDate is 05/25/2011
      var sendDate = $("#txtMaxDate").val();
      var fullDate = new Date()
      var currentDate = fullDate.getMonth()+1 + "/" + fullDate.getDate() + "/" + fullDate.getFullYear();
      var newSendDate = sendDate.UTC();
      alert(newsendDate);
  
  
      }
  &lt;/script&gt;
  </code></pre>