PDA

View Full Version : datefield listener ?



nathanblogs
11 Feb 2010, 11:00 PM
Hi,

I can't seem to get the datefield listeners to work, any help I have found talks about using menuListeners but they also don't work. I am currently using 3.1.1.

Here is my code, all I have in the listener is an alert, but I can't get it to work.



var dateRangeContainer = new Ext.Container({
fieldLabel: 'Date Range',
items: [{
xtype: 'datefield',
columnWidth: 0.35,
editable: false,
emptyText: 'After date...',
enableKeyEvents: true,
id: 'afterdate',
itemId: 'afterDate',
listener: {
select: function( ){
alert('test');
}
}
},
{
xtype: 'datefield',
columnWidth: 0.35,
editable: false,
emptyText: 'Before date...',
enableKeyEvents: true,
itemId: 'beforeDate',
id: 'beforedate'
}],
layout: 'column',
anchor: '80%'
});

return dateRangeContainer;
}

Eugen_
11 Feb 2010, 11:23 PM
Hi nathanblogs,


listeners

nathanblogs
11 Feb 2010, 11:31 PM
Hi nathanblogs,


listeners

Thanks, I think its time for a break ~o) .