I am passing Date having format('dd/mm/yyyy') from jquery to C# using Page Method. When i pass date 31/07/2014 to PageMethod, it gives me error 31/07/2014 is not a valid value for DateTime.
Here is my Code..
var dto = {
'StudentList': StudentList,
'StudentFeeList': StudentFeeDetail,
'StartingDate': $('#txtStartingDate').val(),
'ClosingDate': $('#txtEndingDate').val()
};
this DTO is passed to PageMethod. I am saving data at this time.
While retrieving Date from DataBase i have converted it like this.
convertDate = function (jsonDate) {
var date = new Date(parseInt(jsonDate.substr(6)));
return date.format("dd/mm/yyyy");
},
Any Help.. Thanks.