jahertor / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 1 forks source link

Date format in grid. #210

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Date formatting in grid doesn't work

Steps to reproduce:
1. Open http://www.gwt-ext.com/demo/#editableGrid
    new DateFieldDef("availDate", "availability", "m/d/Y"), 
2. In grid dates are formatted like Tue Apr 18 2006 00:00:00 GMT+0400
(Russian Daylight Time)

Environment:
 Win 32 Xp sp2 English, locale Russian.  
 Browser FireFox 2.12 the same bug in IE7

When I tried to make my own examples bug was the same. I believe the reason
is Russian locale.

It is defenitly gwt-ext bug because in
http://extjs.com/deploy/dev/examples/grid/edit-grid.html example dates
looks OK.

see attachments for screen shots 

Original issue reported on code.google.com by denis.ts...@gmail.com on 11 Feb 2008 at 4:53

Attachments:

GoogleCodeExporter commented 8 years ago
The dateformat passed to the DateFieldDef constructor is only used to convert 
the raw
incoming data to ti correct data type. 

In order to alter the formatting of data displayed in a Grid, you need to 
register a
Renderer with the ColumnModel, and then format the data as desired. In your 
case you
can use GWT's com.google.gwt.i18n.client.DateTimeFormat to format the date.

If you have additional questions, please post on the GWT-Ext fourms :
http://www.gwt-ext.com/forum

Original comment by sanjiv.j...@gmail.com on 27 Feb 2008 at 2:27