Results 1 to 2 of 2

Thread: Date format renders but grid.getstore data remains unchanged

  1. #1

    Default Date format renders but grid.getstore data remains unchanged

    Hello all,

    There are many references to Date format rendering here which I have followed to get the following:



    1. I have a columnmodel inside an editorgridpanel with custom renderers based on data type.
      • formatDate(value){
        return value ? value.dateFormat('m/d/Y') : '';
        }

    2. Editor for the date filed is : new Ext.form.DateField({format: 'm/d/y'})
    3. I can see the rendering action on the row when it is edited, but when sent to the server via grid.getStore().data.items the date format is still Thu Nov 19 2009 00:00:00 GMT-0500 (EST)


    I know there is a solution for this but I'm not able to figure it out.


    Many thanks!

  2. #2
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,232

    Default

    column renderers merely format Record data for display.

    your date column's underlying data is still a plain-old js Date object.
    you'll need to create a string representation of that js Date object in the required format and send that over the wire instead.

Posting Permissions

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