PDA

View Full Version : Get the value of child elements of panle



Soumyajm
27 Aug 2012, 12:41 AM
Hi,
How to get the value by using id of the child element of panel . Here is my code

var filterPanel = Ext.create('Ext.panel.Panel', {
bodyPadding: 5, // Don't want content to crunch against the borders
width: 300,
title: 'Filters',
items: [{
xtype: 'datefield',
fieldLabel: 'Start date',
itemId: 'startdate',
}, {
xtype: 'datefield',
fieldLabel: 'End date',
itemId:'enddate'
}]
});

suzuki1100nz
27 Aug 2012, 12:58 AM
Hi - Look in the API under the panel class.
Namely query() method and queryById()
Another useful tool for finding components is the Ext.ComponentQuery singleton

vietits
27 Aug 2012, 1:04 AM
Try this:


var startDate = filterPanel.down('#startdate');