My requirement is:
i want to take an input date from a datefield, and then display the value in xtype: displayfield.
the problem is: currently the value is being displayed like this-
Thu Mar 1 00:00:00 UTC+0530 2012
Code:
var dateItem ={
layout: 'column',
items: [
{
xtype: 'datefield',
id: 'dateInput',
name: 'dateInput',
format: 'm/d/Y',
fieldLabel: 'Date',
labelWidth: 50
},
{
xtype: 'button',
width: 90,
text : 'Get List',
listeners: {
click: function() {
dateVal=Ext.getCmp('dateInput').getValue();
Ext.getCmp('dateId').setValue(dateVal);
}
}
}
]
};
//-------------Message-------------------
var dateLabel={
xtype: 'displayfield',
bodyStyle: itemStyle,
fieldLabel: 'List of application for',
labelWidth: 130,
id: 'dateId',
value: '1/1/1900'
}