having a bit of a problem here with what should be a pretty simple solution. I have a Contract Model with two date fields :
{ name: 'startDate', type: 'datetime', dateFormat: 'M d Y'}, { name: 'endDate', type: 'datetime', dateFormat: 'M d Y' }
In the grid these show fine E.g. "Mar 01 2013".
{ dataIndex: 'startDate', text: 'Start', xtype: 'datecolumn', format: 'M d Y', autoWidth: true }, { dataIndex: 'endDate', text: 'End', xtype: 'datecolumn', format: 'M d Y', autoWidth: true }
When clicking on a grid item i'm loading another panel with a form component in and two datefields.
{ xtype: 'datefield', name: 'startDate', value: 'startDate', width: 300, disabled: true, hidden: false, fieldLabel: 'Starts' }, { xtype: 'datefield', name: 'endDate', value: 'endDate', width: 300, disabled: true, hidden: false, fieldLabel: 'Ends' },
In the controller i'm simply getting the form component and passing the record to the loadRecord method. When I log the two elements from the record I get the following data.
2012-03-01T12:00:00
2013-03-01T12:00:00
The problem is that the form's datefields don't load the date into them to edit. It appears to be some sort of formatting or binding issue. Any ideas? Thanks!