<script>
//Extjs2.2.1 DateField 变形的问题
// IE
Ext.isIE9 = Ext.isIE && navigator.userAgent.indexOf(‘MSIE 9‘)!=-1;
Ext.isIE10 = Ext.isIE && navigator.userAgent.indexOf(‘MSIE 10‘)!=-1;
Ext.override(Ext.menu.Menu, {
autoWidth: function() {
var el = this.el,
ul = this.ul;
if (!el) {
return;
}
var w = this.width;
if (w) {
el.setWidth(w);
} else if (Ext.isIE && !Ext.isIE8 && !Ext.isIE9 && !Ext.isIE10) {
el.setWidth(this.minWidth);
var t = el.dom.offsetWidth;
el.setWidth(ul.getWidth() + el.getFrameWidth("lr"));
}
}
});
// chrome
Ext.override(Ext.menu.DateMenu, {
render : function() {
Ext.menu.DateMenu.superclass.render.call(this);
if (Ext.isGecko || Ext.isSafari || Ext.isChrome) {
this.picker.el.dom.childNodes[0].style.width = ‘178px‘;
this.picker.el.dom.style.width = ‘178px‘;
}
}
});
</script>
【转】Extjs2.2.1 DateField 变形的问题解决方案,布布扣,bubuko.com
【转】Extjs2.2.1 DateField 变形的问题解决方案