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 errors.
Can someone tell me what's the matter?
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 errors.
Can someone tell me what's the matter?
Share Improve this question edited Mar 15, 2011 at 16:53 Bill the Lizard 406k212 gold badges574 silver badges892 bronze badges asked Nov 11, 2010 at 6:45 MarkMark 2,1354 gold badges27 silver badges44 bronze badges 1- I have e across this issue when I have by mistake passed a string containing html elements where a single value is expected. jQuery starts to parse that and js recursion stack exceeds. Just a pointer help you debug the code. – Ajaxe Commented Feb 3, 2011 at 19:11
2 Answers
Reset to default 4I'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 plete package as one file for testing, and if it does not work, provide a failing test case so we can look at it.