[CLOSED] Simple date render question

  1. #1

    [CLOSED] Simple date render question



    Hi
    Im using this code to set the dateformat.

    string strDateformat = Coolite.Utilities.DateTimeUtils.FormatNetToPHP("d");
    Renderer rRenderer = new Renderer();
    rRenderer.Fn = "Ext.util.Format.dateRenderer('" + strDateformat + "')";
    gpViewsPerGroup.ColumnModel.Columns[3].Renderer = rRenderer;
    Works great, but it does not show the time. How do I do that. I tried
    string strDateformat = Coolite.Utilities.DateTimeUtils.FormatNetToPHP("d-t");
    but that does not work.

    HELP! :)

    /mikael
  2. #2

    RE: [CLOSED] Simple date render question

    Hi Mikael,

    The following Datejs documentation lists all the acceptable format specifiers, see*http://code.google.com/p/datejs/wiki/FormatSpecifiers


    The .toString() function lists the .NET format specifiers, which would be passed into the .FormatNetToPHP Method.


    Or, the .format() function lists the PHP format specifiers which could be passed directly into the .dateRenderer() function.


    The ExtJS docs has an "official" list of accepted format specifiers, see*http://extjs.com/deploy/dev/docs/?class=Date


    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Simple date render question

    Thanks I see. It works great.

    The code now looks like this, prints out the date like the culture setting on the .NET page. then the time in 24H format ex 18:31
    
    
    
    string strDateformat = Coolite.Utilities.DateTimeUtils.FormatNetToPHP("d");
    Renderer rRenderer = new Renderer();
    rRenderer.Fn = "Ext.util.Format.dateRenderer('" + strDateformat + " - H:i')";
    gpViewsPerGroup.ColumnModel.Columns[3].Renderer = rRenderer;

    /Mikael

Similar Threads

  1. [CLOSED] Question - GridPanel Render And IE9
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 25
    Last Post: May 01, 2012, 4:25 PM
  2. Replies: 4
    Last Post: Jun 30, 2011, 3:30 PM
  3. Very simple question TreePanel check or uncheck all
    By apocalipse9 in forum 1.x Help
    Replies: 0
    Last Post: Jun 17, 2010, 12:36 AM
  4. [CLOSED] Simple Question: Add Script to ScriptManager via Ext Javascript.
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 12, 2009, 4:06 AM
  5. [CLOSED] Simple radiogroup question
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 24, 2009, 5:56 AM

Posting Permissions