title: jQuery Date Picker Validation Problems
body: <p>I am trying to validate the two input boxes where the user selects a date - i've managed to get far as restricting the user to select a previous date and if they select the first textbox as today's date the next input box must be one day ahead (future date)</p>
  
  <p>On submit i am trying to get it to validate so if you dont select one of the input boxes it gives you an error message. </p>
  
  <pre><code>&lt;asp:Label ID="lblPickupDate" runat="server" Text="Pick-up Date" CssClass="lblPickup"&gt;&lt;/asp:Label&gt;
  &lt;input type="text" class="datePicker" id="validBeforeDatepicker" value="Please select a date" name="pickupdate" /&gt; &lt;span class="ui-icon ui-icon-calendar"&gt;&lt;/span&gt;
  
  &lt;asp:Label ID="lblReturnDate" runat="server" Text="Return Date" CssClass="lblReturnDate"&gt;&lt;/asp:Label&gt;
  &lt;input type="text" class="datePicker" id="validAfterDatepicker" value="Please select a date" name="returdate" /&gt; &lt;span class="ui-icon ui-icon-calendar"&gt;&lt;/span&gt;
  
  $(function () {
      $("#validBeforeDatepicker").datepicker({
          showOn: "button",
          buttonImage: "/assets/img/calendar.gif",
          buttonImageOnly: true,
          minDate: 0,
          required: true,
          message: "This is a required field",
          dateFormat: 'dd-mm-yy',
          onClose: function() {$(this).valid();}
      });
  });
  
  $(function () {
      $("#validAfterDatepicker").datepicker({
          showOn: "button",
          buttonImage: "/assets/img/calendar.gif",
          buttonImageOnly: true,
          minDate: +1,
          required: true,
          message: "This is a required field",
          dateFormat: 'dd-mm-yy',
          onClose: function() {$(this).valid();}
      });
  });
  </code></pre>
  
  <p>Ive set required to true so shouldn't it throw a validation error if you miss it?</p>
  
  <p>The site where the form is: <a href="http://www.rentruck.co.uk" rel="nofollow">http://www.rentruck.co.uk</a></p>
  
  <p>I've also had a look at this but cant seem to replicate it <a href="http://keith-wood.name/uiDatepickerValidation.html" rel="nofollow">http://keith-wood.name/uiDatepickerValidation.html</a></p>