开发者

jQuery UI 1.7.3 datepicker conflict with date.js causing "too much recursion"?

开发者 https://www.devze.com 2023-01-24 06:43 出处:网络
I\'m trying to use jQuery UI 1.7.3 datepicker widget in a jQuery UI dialog.The contents of the dialog are from a page template which includes all the various imports of javascript required to make the

I'm trying to use jQuery UI 1.7.3 datepicker widget in a jQuery UI dialog. The contents of the dialog are from a page template which includes all the various imports of javascript required to make the page function. One of the things I also import is the famous date.js file.

This page that I load in the dialog also exists by itself as a standalone page. The datepicker works like a charm there. Everything breaks when I load it in the dialog. When focus is given to the date input field, the datepicker should show up. However, I get a disgusting error like so:

too much recursion
[Break on this error] return w;};Date.prototype.isDST=function...ase"z":return"";}}):this._toString();};\n

The datepicker calendar doesn't show and I get 1 error in my firebug saying that it's date.js that is puking. I've ran into similar problems like this in the past dealing with too much recursion but I am never too sure how to fix such err开发者_开发问答ors.

Can someone tell me what's the matter?


I'm running jQuery UI 1.7.3 and date.js as well for a modal window and was having the same problem. I was sending all of the scripts needed for the standalone page and for the dialog all in one go, but this meant that some of the same scripts were actually duplicated from the main application window to the dialog. Removing references to the duplicated scripts (for the dialog) fixed the problem.

In essence, Date.js was being loaded twice, and fixing that fixed the problem.


I'm successfully using the datepicker in a modal jqueryui dialog, version 1.8.9. But I'm including the .js as a 'all-in-one'.

You should try to update jqueryui or use the complete package as one file for testing, and if it does not work, provide a failing test case so we can look at it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号