View Full Version : extjs datetime format post back to asp.net problem

28 Jun 2010, 11:14 PM
HI all

ASP.net could not deserialize the extjs datetime format in JSON. I think it was a known issue, is there any solution yet?

error from asp.net:

DateTime content '2010-06-29T00:00:00' does not start with '\/Date(' and end with ')\/' as required for JSON.'

28 Jun 2010, 11:36 PM
What kind of 'post back' are you talking about?

- store save (encoded or json)
- form submit
- own request

29 Jun 2010, 12:29 AM
You could override the JsonEncode for Dates

Ext.util.JSON.encodeDate = function(d) {
return d.format('M$');

22 Feb 2011, 5:25 PM
The following was very helpful:


I was then able to use JSON.stringifyWcf(data) to serialize the nested JavaScript Date objects into a format that the ASP.NET deserializer would handle:

type: 'POST',
url: 'MailService.asmx/AccessSaveMerchant',
data: 'data=' + escape(JSON.stringifyWcf(data)),
success: function() {
m.IsDirty = false;