[CLOSED] How to format date yyyy/MM/dd using renderer.fn

  1. #1

    [CLOSED] How to format date yyyy/MM/dd using renderer.fn

    I am using renderer.fn and would like to change the cell backgroud color and display date format in yyyy/MM/dd.


    function (value, metadata)
    {
    metadata.style="background-color:#FF00FF";
    return Ext.Util.Format.Date(value);
    }
    Last edited by Daniil; Mar 14, 2013 at 11:20 AM. Reason: [CLOSED]
  2. #2
    Hi,

    The "Util" and "Date" must be lowercase "util" and "date".

    Also you have to pass a format as the second parameter.
    http://docs.sencha.com/ext-js/4-2/#!...at-method-date

    Here is the specification of formats.
    http://docs.sencha.com/ext-js/4-2/#!/api/Ext.Date
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    The "Util" and "Date" must be lowercase "util" and "date".

    Also you have to pass a format as the second parameter.
    http://docs.sencha.com/ext-js/4-2/#!...at-method-date

    Here is the specification of formats.
    http://docs.sencha.com/ext-js/4-2/#!/api/Ext.Date
    it works, Ext.util.Format.date(value, 'Y/m/d') thanks

Similar Threads

  1. [CLOSED] when gridpanel column apply renderer.format , renderer.fn not work
    By mis@adphk.com in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 12, 2013, 10:35 AM
  2. Replies: 14
    Last Post: Dec 24, 2012, 12:46 PM
  3. Replies: 1
    Last Post: Apr 13, 2012, 1:52 PM
  4. Replies: 1
    Last Post: Dec 15, 2011, 12:38 AM
  5. Replies: 8
    Last Post: Jun 06, 2008, 1:28 AM

Posting Permissions