Using .NET platform, return a list of DateTime in JSON format such as:
Code:
{"d":["\/Date(1328112000000)\/","\/Date(1328198400000)\/","\/Date(1328284800000)\/"...
Got a model with field in date format and found a function from the net saying that it could parse the datetime to date, but seems not working. Can anyone help? Thanks a lot.
Code:
Ext.regModel('BookingDate', { fields: [
{name:'Date', type:'date', convert : toDateFromJSON }
]
});
Code:
function toDateFromJSON(v, record) {
return Date.parseDate(v, "M$");
}