View Full Version : Date Format (Ext.data.Record)

30 Jun 2010, 6:32 AM
I have an Ext.data.Record configured as

new Ext.data.Record.create(
{name: 'id'},
{name: 'code'},
{name: 'subscription_date', type: 'date'},
{name: 'tier'},
{name: 'created_by'},
{name: 'name'},
{name: 'active'}
The subscription_date is coming back from the server as a string formatted as "Jun 30,2010". However, when I render this date into a grid panel the format I am seeing is Wed Jun 30 2010 00:00:00 GMT-0400 (Eastern Daylight Time) which is the default date format for Firefox.

If I apply a dateFormat to the record, the grid no longer has any value in the column for this date...

Any thoughts?

30 Jun 2010, 6:37 AM
The store and grid have separate formats, one for interpretation, and the other for display.

30 Jun 2010, 6:42 AM
So you are not telling the Record what format the date is being RECEIVED in.


30 Jun 2010, 6:43 AM
Thanks, I just realized that the format on the record is meant to parse, which makes perfect sense... Appreciate the very quick response.