In my jQuery code I am calling a controller action and I'm trying to pass in dates from the fullcalendar plugin:
url: ('Home/List/?dateValueStart=' + new Date($('#calendar').fullCalendar('getView').start))
+ '&dateValueEnd=' + new Date($('#calendar').fullCalendar('getView').end),
In my controller I have my method setup like this:
public ActionResult List(String dateValueStart, String dateValueEnd)
When I debug dateValueStart I see this:
Tue Oct 1 00:00:00 MDT 2013
DateTime dateVal = Convert.ToDateTime(dateValueStart);
But when I try to convert this to a date it tells me it is invalid.
String was not recognized as a valid DateTime.
How can I get a date close to 10/1/2013?