I have a strongly typed partial view with a date in it, like this -
@model Models.MyModel
MyDate: @Html.DisplayFor(m => m.MyDate)
With JQuery, I am posting back in the following manner -
var urlPost = Url.Action("MyArea", "MyController", "MySaveAction");
$.post(urlPost, form, function (returnHtml) {};
My controller looks like this -
[HttpPost]
public ActionResult MySaveAction(MyModel m)
{
// My code
}
The other properies in the model are posting fine, but "MyDate" is not. "MyDate's" value is displayed as "1/18/2010 12:00:00 AM", but is posting back as "1/1/0001 12:00:00". Can someone tell me why?
Thanks very much for any help!