PDA

View Full Version : Datetime rendering and support for IE7 and 8



BKrones
31 Jul 2013, 8:27 AM
Hi there,
i built an ExtJS Grid including 2 rows loaded with datetime store data.

Model:

fields: [
{
name: 'Geaendert_von'
},
{
name: 'Geaendert_am'
}
]

The output should to be: (IE 9+ and Chrome, Firefox, etc. )
45140
The output in IE 7 and 8:
45139

Is it possible to render those datetimes being formatted in those browsers, too?

Thanks alot

slemmon
4 Aug 2013, 8:52 AM
I would think this would work out of the box. Can you post a test case with the grid + store + sample data?

Gary Schlosberg
4 Aug 2013, 9:13 AM
Additionally, you might try setting the dateFormat for your fields: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Field-cfg-dateFormat.

BKrones
6 Aug 2013, 1:55 AM
Hey guys,
i found out the problem myself.



Get default fields ( not datetime fields ), get its model's types to datetime and its model's dateFormat to 'c'.
In view each field add a renderer and return your custom datetime:
"return Ext.Date.format(new Date(), 'd.m.Y H:i:s');"


Thank you guys for your help :)