Hi Arne, It looks like DateField::getValue returns a Date object. The format option doesn't help in formating the getValue value.
http://www.sencha.com/forum/showthread.php?73210-CLOSED-3.0rc3-Datefield-getValue%28%29-ignores-specified-format&p=352264#post352264 There may be some interesting workarounds proposed in the above thread. Pierre On Thu, Sep 23, 2010 at 2:52 PM, Arne Kepp <[email protected]> wrote: > Hi, > > I've encountered what I think is a bug in 0.7 and trunk (tested last > night). I've made a WFS layer that is backed by a Postgis, one the of > the fields is a date. The dates that come from the WFS are formatted as > '2010-09-20Z'. > > I can get them to display properly by defining the field in the > FeatureStore and column model as follows, but when I hit save the > wfs:property value that is sent to the WFS server is "Mon, 20 Sep 2010 > 06:21:28 GMT", which then fails. > > I am guessing that the dateFormat is not applied when writing out the > WFS feature. If anyone has a hint where in the code this needs to be > fixed, I'd be happy to attempt a patch. And if someone makes me a Trac > account I can see if I can make something reproducible too. > > -Arne > > FeatureStore > ... > {name: "someDate", type: "date", dateFormat: 'Y-m-d\\Z' }, > ... > > Column model > ... > { > xtype: 'datecolumn', > header: 'Date', > dataIndex: 'someDate', > format: 'd.m.y', > width: 90, > sortable: true, > groupRenderer: Ext.util.Format.dateRenderer('M y'), > editor: { > xtype: 'datefield', > allowBlank: true > } > }, > ... > > > _______________________________________________ > Dev mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/dev > -- Pierre GIRAUD Géomaticien, Analyste Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 93 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Dev mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/dev
