PDA

View Full Version : date field empty after form load



medinalex
5 Feb 2010, 12:00 PM
I had a datefield on my form, so after loading data from a JSP it get empty.


layout:'column',
items:[{
columnWidth:.33,
layout: 'form',
items: [{
xtype:'datefield',
fieldLabel: 'Date',
name: 'date',
anchor:'95%',
allowBlank:false,

}]
}

medinalex
5 Feb 2010, 12:26 PM
all fields load fine except the date

mystix
11 Feb 2010, 9:21 AM
what does the incoming date string from the server look like?

also note that you've failed to specify a format config on your DateField, so the default DateField#format will be used.

medinalex
11 Feb 2010, 9:26 AM
I fix it. From my MySQL SELECT statement i just format the date field.

select date_format(`master`.`date`,_utf8'%m/%d/%Y') AS `date_f` from master