Q:

can't POST a Date with JSON using MVC

I have a date picker to get a date and I know that I can get the value because of the alert but I can't seem to sucessufuly make the POST 
alert(stringDate); //Sat Sep 27 2014 00:00:00 GMT+0100 (GMT Standard Time)

$.ajax({
     url: '/Indicators/ChangeTime',
     dataType: "json", 
     type: "POST", 
     data: JSON.stringify(stringDate),
     success: function(returl){ 
             alert('It worked'); 
             location.href=returl.Url;
      }, 
      error: function(jqXHR,responseText,textStatus){ alert(jqXHR.responseText) } 
});

in the controller I've got the following:
public JsonResult ChangeTime(string jason)
{
    ...
    datepickerDate = DateTime.Parse(jason);
    ...
}

when I run it I always get a System.ArgumentNullException.

A:

Your data: option is incorrect. You want to pass it with the parameter name that your public JsonResult ChangeTime action expects.
data: {
    jason: JSON.stringify(stringDate),
}

You should also be able to change your public JsonResult ChangeTime(string jason) to public JsonResult ChangeTime(DateTime jason) as MVC should be able to convert the post values to a DateTime for you.

