Results 1 to 4 of 4

Thread: Date Format (Ext.data.Record)

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Location
    Burlington, Ontario
    Posts
    175

    Default Date Format (Ext.data.Record)

    I have an Ext.data.Record configured as

    PHP Code:
    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?

  2. #2
    Sencha User
    Join Date
    Sep 2009
    Location
    Calgary, Alberta, Canada
    Posts
    638

    Default

    The store and grid have separate formats, one for interpretation, and the other for display.

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    So you are not telling the Record what format the date is being RECEIVED in.

    http://www.sencha.com/deploy/dev/doc...ber=dateFormat

  4. #4
    Sencha User
    Join Date
    Jun 2009
    Location
    Burlington, Ontario
    Posts
    175

    Default

    Thanks, I just realized that the format on the record is meant to parse, which makes perfect sense... Appreciate the very quick response.

Similar Threads

  1. Format a date in Ext.Template
    By cainy82 in forum Ext 2.x: Help & Discussion
    Replies: 13
    Last Post: 25 Mar 2013, 3:33 PM
  2. Ext JS date format
    By rubenbentein in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 17 Jun 2010, 3:33 AM
  3. Date Field Format (ext-3.1.1)
    By Maik (SL) in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 18 Mar 2010, 6:34 AM
  4. Date format renders but grid.getstore data remains unchanged
    By pegasus in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 14 Nov 2009, 7:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •