jQuery UI datepicker performance

别说谁变了你拦得住时间么 提交于 2019-12-20 23:27:03

问题


I have a textbox on my web page that is used to specify a date, so I'd like to use the jQuery DatePicker. However, most of my users are locked into using IE6 and the performance of the jQuery DatePicker is a little sluggish in this browser.

Can anyone recommend an alternate JavaScript date picker, or any means of improving the display performance of the jQuery DatePicker?


回答1:


I also ran into this problem. Here are a couple of things that can help performance in IE6:

  1. Turn on background image caching. This will load images before the datepicker is shown:

    try {
        document.execCommand("BackgroundImageCache", false, true);
    } catch(exception) {
        // other browsers do nothing
    }
    
  2. Turn off animations. Things won't look as nice, but performance is what matters:

    $("#datepicker").datepicker( { showAnim: '' });
    

These seemed to help a bit for me. There may be other small tweaks you can do also.



来源:https://stackoverflow.com/questions/2991439/jquery-ui-datepicker-performance

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