You could do something like this:
Code:
// The data store containing the list of states
var states = Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data : [
{"abbr":"AL", "name":"Alabama"},
{"abbr":"AK", "name":"Alaska"},
{"abbr":"AZ", "name":"Arizona"}
]
});
Ext.create('Ext.form.Panel', {
title: 'Contact Info',
width: 300,
bodyPadding: 10,
renderTo: Ext.getBody(),
items: [
{
xtype: 'combobox',
fieldLabel: 'Choose State',
itemId: 'combofield',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'abbr',
listeners: {
select: function(combo,records) {
var form = combo.up('form');
form.down('#container').setVisible(true);
}
}
},
{
xtype: 'fieldcontainer',
itemId: 'container',
items: [
{
xtype: 'datefield',
fieldLabel: 'Date',
},
{
xtype: 'datefield',
fieldLabel: 'Date',
}
],
hidden: true
}
]
});
Scott.