问题
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:
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 }
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