Extjs2.2.1 DateField 변형 문제

1308 단어 ExtJs
<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>

 

좋은 웹페이지 즐겨찾기