.NET DateTime serialised to JSON for use in ExtJs JsonStore(event store for ExtJs Calendar)? -
i'm trying set json store extjs calendar.
store uses http proxy retrieve it's data.
stores fields include startdate , enddate objects of type date.
i'm serializing data in c# code json requested http proxy.
wondering should serialize start , endates string or c# datetime type.
@ moment serialising them datetime types.
the json response looks this:
{"data": "items":[{ "cid":"0", "end":"\/date(1275260400000+0100)\/", "notes":"4:00", "start":"\/date(1275260400000+0100)\/", "title":"basic""}]
the start , end properties sort of date reference. have tried serialising startdate , enddate's strings rather datetime types. returns following jsonresponse:
{"data": "items":[{ "cid":"0", "end":"03/06/10", "notes":"4:00", "start":"04/06/10", "title":"basic""}]
however, in both cases when store has finished loading enddate , startdate fields undefined. should here?
thinking maybe have format dates format expected extjs?
below sample code:
this.eventstore = new ext.data.jsonstore({ id: 'eventstore', root: 'data.items', proxy: new ext.data.httpproxy({ url: approotpath + 'calendar/getcalendardata', method: 'post' }),//proxy fields: ext.calendar.eventrecord.prototype.fields.getrange() });
check documentation ext.data.field - http://dev.sencha.com/deploy/dev/docs/?class=ext.data.field . has property named 'dateformat' allows specify exact date format.
Comments
Post a Comment