Results 1 to 2 of 2

Thread: Date custom Renderer problem

  1. #1

    Default Date custom Renderer problem

    Hi

    I tried with following custom renderer for date column in a grid.

    column:

    {name: 'createdDate', mapping:'createdDate',type: 'date', dateFormat: 'Y-m-d H:i:u'},

    renderer:

    renderer:
    function(val){

    if(!(val instanceof Date)){
    val = Date.parseDate(val,
    'Y-m-d'); // val is becoming undefined here.
    }
    return val.dateFormat('Y-m-d');////here I am getting val undefined error

    }



    is anything wrong in the code ?

    Here is the data : "2009-08-15 00:00:00.0"

  2. #2

    Default

    I got the problem .. I shouldnot have : after s , it should be s.u

    column:
    Code:
    {name: 'createdDate', mapping:'createdDate',type: 'date', dateFormat: 'Y-m-d H:i:s.u'},
    Last edited by mystix; 23 Aug 2009 at 6:23 PM. Reason: post code in [code][/code] tags

Posting Permissions

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