PDA

View Full Version : isVisible not working



nikhilkrishnan
29 Jun 2010, 11:51 PM
Hi,

I have created a datefield which is a hidden element


{
xtype:'datefield',
name:'c_cl_date',
hidden:true,
hideLabel:true,
id:'c_cl_date',
anchor:'50%',
format:'d-m-Y',
readOnly:true
}
and used isVisible function to check whether the element is hidden or not


if(!Ext.getCmp('c_cl_date').isVisible()){
Ext.getCmp('c_cl_date').show();
}else{
Ext.getCmp('c_cl_date').hide();
}
The problem is Ext.getCmp('c_cl_date').isVisible() returns true even if the element is hidden.
Please help..

I have tried hideMode:'visibility' too

Nikhil

fay
30 Jun 2010, 2:03 AM
Use FireFox/FireBug and step into the isVisible method to see how it is checking whether the field is "visible" or not. I just tried it with the xml-form example and it does work as expected.