In the model you would use
{ name: "expirationDate", type: "date", dateFormat: 'c' }
dateFormat
simply uses Ext.Date.parse()
which matches the PHP date() function.
Your format appears to be ISO 8601 date
Question
From server I receive such data:
expirationDate : "2014-08-27T22:00:00.000+0000"
and in MVC ExtJS 4 in Model I have this:
fields: [
...
{name: "expirationDate", type: Ext.data.Types.DATE, dateFormat:"yyyy-MM-dd'T'HH:mm:ss.SSSz"},
...
But the main problem is that dateFormat
. Which should I choose for my date sample? This one doesn't word correctly
Solution
In the model you would use
{ name: "expirationDate", type: "date", dateFormat: 'c' }
dateFormat
simply uses Ext.Date.parse()
which matches the PHP date() function.
Your format appears to be ISO 8601 date