title: Validate date and datetime with Bootstrap datetime picker, Jquery validation plugin in an Asp.Net MVC4 application
body: <p>I am currently developping a MVC Asp.Net 4.6 WebApp with <a href="http://bootstrapdocs.com/v3.1.1/docs/" rel="nofollow noreferrer">Bootstrap 3.1.1</a>, <a href="https://github.com/Eonasdan/bootstrap-datetimepicker" rel="nofollow noreferrer">Eonasdan datetime picker v4.7.14</a> and <a href="http://jqueryvalidation.org/" rel="nofollow noreferrer">jquery validation plugin v1.14.0</a>.</p>
  
  <p>And I've got some problem validating the date.</p>
  
  <ul>
  <li><p>My Model looks like that:</p>
  
  <pre><code>public class PersonModel{
      ...
  
      [Required]
      [Display(Name = "Date of Birth")]
      public DateTime? DateOfBirth { get; set; }
  
      ...        
  }
  </code></pre></li>
  <li><p>My View looks like that:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      @Html.LabelFor(x =&gt; x.DateOfBirth):
      &lt;span class="text-danger"&gt;&lt;b&gt;*&lt;/b&gt;&lt;/span&gt;
      &lt;div class="input-group datepicker"&gt;
          &lt;span class="input-group-addon"&gt;
              &lt;span class="glyphicon glyphicon-calendar"&gt;&lt;/span&gt;
          &lt;/span&gt;
          @Html.TextBoxFor(x =&gt; x.DateOfBirth, new {@class = "form-control", @data_date_format = "DD/MM/YYYY", @placeholder = "DD/MM/YYYY"})
      &lt;/div&gt;
      @Html.ValidationMessageFor(x =&gt; x.DateOfBirth, "", new { @class = "text-danger" })
  &lt;/div&gt;
  </code></pre></li>
  <li><p>The associated Js code to init th datetime picker:</p>
  
  <pre><code>(function () {
      // Init bootstrap date/time pickers
      $(".datepicker").datetimepicker({
          useCurrent: false
      });
  })(jQuery);
  </code></pre>
  
  <p>Using <code>jQuery.validator</code>, even if the the date looks good, I always get this error:</p>
  
  <p><a href="https://i.stack.imgur.com/3Qhfh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Qhfh.png" alt="enter image description here"></a></p>
  
  <p>I know that <code>jQuery.validator</code> works fine with the jquery.ui.datepicker but how can I make it work with the bootstrap.datetimepicker ?</p></li>
  </ul>