I'm getting an error when I call my WebMethod due to the Date format. I have a Date equal to DateTime.MinValue.
calling...
ko.toJSON({ employee: viewModel.employee });
[WebMethod]
public static string SaveEmployee(Employee employee)
{
}
I get the following results...
Chrome (works):
"terminationDate":"0001-01-01T06:00:00.000Z"
IE8 (does not work):
"terminationDate":"1-01-01T06:00:00Z"
How can I fix this?
JSON.parse(JSON.stringify(ko.toJSON({ employee: viewModel.employee })).replace(/\"1-01-01/g, "\"0001-01-01"));
– Deafen