I define a date field within a Window like this...
Code:
new Ext.Window({
...
bbar :[
{
xtype : 'datefield',
fieldLabel : 'Choose Date',
id : 'chooseDate',
listeners : {
'select': onDateChange
}
}
....]
...
}
And then I try to set the value of the field like this
Code:
Ext.get('chooseDate').setValue('04/02/2010');
But I get the error "Error: Ext.get("chooseDate").setValue is not a function"
Ext.get('chooseDate').getValue() works just fine.
So it seems that I'm getting the DOM element which the DateeField is attached to, but not the fully fledged DateField object itself.
How would I do that?
Thanks,
Paul