View Full Version : [SOLVED] Renderer date value ok in Opera but null in IE and firefox

21 Dec 2009, 7:43 AM
Hi all.
I'm new with ExtJs.

In a grid, i use a renderer function to render a date.
This function works perfectly in Opera but the parameter sent to this function is null in IE and firefox so my function is not working.

Can you tell me what is wrong with my code ?

Part of my column model : (dt is a date type value)

id: 'dt', dataIndex: 'dt', header: _('associe_dt'), hidden: false, renderer: dtLisible

My function :

function dtLisible(dt)
alert(dt); //dt == null in IE and firefox, but dt == 'Fri Dec 18 2009 14:17:16 GMT+0100' in Opera



22 Dec 2009, 12:39 AM
In fact it is because of the type date.
In any browser, my value as a string is : 2009-12-18 14:17:16
In Opera my value as a date is : 'Fri Dec 18 2009 14:17:16 GMT+0100'
In IE and Firefox, my value as a date is : null

Does someone knows why ?

22 Dec 2009, 12:53 AM
I find the solution.

The problem is i tell in my datastore that dt is a date but i didn't tell which format (i thought by default it should be the standard ISO8601 but no)
So if i write this, it is ok :

{name: 'dt', type:'date', dateFormat: 'Y-m-d H:i:s'}