PDA

View Full Version : DateField format question



josebalius
6 May 2010, 6:21 AM
Hey guys, I know I must be doing something wrong here but I have an EditorGridPanel with some columns that have values such as "02-18-08", "01-02-10", ect.

I added the following to one of the columns on the column model




var fm = Ext.form;

{

id: 'date_received',
header: 'Received',
dataIndex: 'date_received',
width: 50,
sortable: true,
resizable:false,
editor: new fm.DateField({

format: 'm-d-y',
}),
hidden: false,
editable: true
}


The problem I have is that when they pick a date on the DatePicker and the date looks to be m-d-y however when they click outside of it, the date gets converted to Wed Nov 18, 2010 (example) so not in m-d-y format.

I'm I missing something? I think a hunch that it may be that the date_received field defined on the store that the grid uses has the type defined as String, could this be it?

Thanks!

josebalius
6 May 2010, 6:48 AM
Nvm guys, my own suspicion was the problem, I needed to make the store field have a date field type.