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
>  }
> },
> ...

Hi Arne

I guess store.get("someDate") returns a JavaScript Date object, and
when providing this to the OpenLayers WFST format, toString is applied
to that object, which isn't appropriate for your use case.

Just a hint.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to