Validating SharePoint 2010 DateTimePicker Control

Validating SharePoint 2010 DateTimePicker Control

I'm trying to use jQuery required validation with a SharePoint 2010 DateTimeControl, but I'm not seeing any type of response when I click submit and leave my control blank. Can you use jQuery validation with this control? If so, can someone tell me what I am doing wrong?


  1. <div id="preopForm">
  2. <fieldset class="form">

  3.            ...

  4. <div class="row">
  5. <label class="label">Presentation Date</label>
  6. <SharePoint:DateTimeControl ID="preopDate" runat="server" DateOnly="true" />
  7. </div>
  8.       ...





  1. $("#preopForm").validate({
  2. rules: {
  3. '#<%=preopDate.ClientID %>': {
  4. required: true
  5. }
  6. },
  7. messages: {
  8. '#<%=preopDate.ClientID %>': {
  9. required: "*"
  10. }
  11. }
  12. });