Reprinted: ExtJS calendar control displays abnormally in chrome (full screen) solution

The extjs2.2-3.0 Date control is displayed abnormally in chrome (reproduced: http://blog.sina.com.cn/s/blog_4b5bc0110101abpx.html)

Solution:

1. Add the width of the control to date-picker.css 185

. x-date-picker

{

border: 1px solid;

border-top:0 none;

position:relative;

width: 185px;

}

Of ​​course, date-picker.css needs to be imported

Second ,

when using the DateField control of extjs, the total When the time space display appears, the width occupies the entire screen. Later, I found that a bug in extjs under chrome was

solved: rewrite DateMenu, add style.width='178px'


/********** to solve Calendar control display exception **********/ 
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'; 
        } 
    } 
});

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326943372&siteId=291194637