PDA

View Full Version : Timestamp in grid



mjhaston
12 Feb 2013, 4:44 PM
How could I possibly have this screwed up? I've fought with this too long and can't even get it to display as plain text. All I want is for it to show up like in Windows Explorer: "2/12/2013 7:43 PM"

Right now nothing shows up. Even when I take away all the date code and try and have it display as text in a gridcolumn!


MODEL:

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



GRID:

}, {
xtype : 'datecolumn',
dateIndex : 'access_timestamp',
header : 'ACCESS',
sortable : true,
width : 100,
editable : false
}, {


JSON:

"access_timestamp":"2013-02-12 19:21:31"

mjhaston
12 Feb 2013, 5:03 PM
Never fails that I figure it out after posting. Something weird was going on thought because I couldn't even get this to appear as text until I swapped it out with another working column.

FEEL FREE TO DELETE THIS THREAD.




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







}, {
xtype : 'datecolumn',
dataIndex : 'access_timestamp',
header : 'DUMMY',
sortable : true,
width : 150,
editable : false,
renderer : Ext.util.Format.dateRenderer('n/j/Y g:i A')
}, {

scottmartin
13 Feb 2013, 10:54 AM
Thank you for the update. This thread may be helpful for others.

Scott.