PDA

View Full Version : Date is not displayed when the date is selected from datefield.



jayashree.ram
20 Mar 2012, 4:17 PM
I am having datefields in menubutton.But as soon as i select date from datepicker the datefield disappears.
here is the code which i hav written.Can anyone pls reply asap....:s:s





Ext.onReady(function(){

Ext.QuickTips.init();



var simple = Ext.create('Ext.form.Panel', {
url:'save-form.php',
frame:true,
title: 'Simple Form',
bodyStyle:'padding:5px 5px 0',
width: 350,
fieldDefaults: {
msgTarget: 'side',
labelWidth: 75
},


items: [
{
xtype:'button',
fieldLabel:'Filter button',
text:'Filter',
id:'filter',
menu : [
{
xtype:'datefield',
fieldLabel:'Date :spicker',
name:'dtpk1'

},{
xtype:'datefield',
fieldLabel:'Date picker',
name:'dtpk1'
}
]

}
]
});

simple.render(document.body);
});

mitchellsimoens
21 Mar 2012, 6:46 AM
Menu items have a hideOnClick config

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.menu.Item-cfg-hideOnClick

Also, you should use the Ext.menu.DateItem instead of a date field.