datetimepicker is not working in chrome

懵懂的女人 提交于 2019-12-08 08:50:59

问题


i am using datetimepicker in sencha touch but its working in mozila and not working in chrome , have no idea why this is happening.

I have downloaded from sencha market here is the source

mozila ( its working )

chrome (not working )

UPDATE

simple datepickerfield in chrome isnt working so basically there is some bug in sencha touch

try this sample from official sencha touch and open it in chrome

http://try.sencha.com/touch/2.2.0/docs/Ext.field.DatePicker.1/


回答1:


Its because of Chrome v43+, add this code to your controllers init function

if (Ext.browser.is.WebKit) {

        Ext.override(Ext.util.SizeMonitor, {
            constructor: function (config) {
                var namespace = Ext.util.sizemonitor;
                return new namespace.Scroll(config);
            }
        });

        Ext.override(Ext.util.PaintMonitor, {
            constructor: function (config) {
                return new Ext.util.paintmonitor.CssAnimation(config);
            }
        });
    }



回答2:


I solved it by setting the width of any id with css

#ext-pickerslot-1{
    width: x%;
}

#ext-pickerslot-2{
   width: y%;
}

etc...



来源:https://stackoverflow.com/questions/19314628/datetimepicker-is-not-working-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!