title: jQuery DateTime picker and ASP.NET MVC
body: <p>I'm currently using a jQuery Date Time picker to select a date time to be put in to a database. When using the date time picker, the result shows up properly in the text box it is bound to (IE  27/09/2009 16:00). However, the date time is not being passed to the MVC application properly, and is being received as 01/01/0001 00:00:01.</p>
  
  <p>The method dealing with this requires a single paramaeter - Match m. The page is strongly typed as a match.</p>
  
  <pre><code>&lt;p&gt;
      &lt;label for="TimeAndDate"&gt;Time and date (click to reveal date and time picker):&lt;/label&gt;
      &lt;br /&gt;
      &lt;%= Html.TextBox("TimeAndDate") %&gt;
      &lt;%= Html.ValidationMessage("TimeAndDate", "*") %&gt;   
  &lt;/p&gt;
  
  &lt;script type="text/javascript"&gt;
      $(function() {
          $('#TimeAndDate').datepicker({
              duration: '',
              showTime: true,
              constrainInput: false
           });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>For lengths sake, I've omitted the script includes above, but they are present in the page. The text box and validation message fields were generated by visual studio.</p>
  
  <p>I have a feeling I need, somehow, to implicitly convert the string in the text box in to a DateTime object before passing it to the method, but I don't know how. </p>
  
  <p>Any help on this would be much appreciated</p>
  
  <p>Thanks,
  Andy</p>