我的Easy!Appointments软件中的部分脚本出现问题。
我收到以下错误:
jQuery.Deferred异常:超出最大调用堆栈大小RangeError:超出最大调用堆栈大小 at Date。$ P.toString [as _toString](https://DOMAIN/panel//assets/ext/datejs/date.js:49:911)
未捕获RangeError:超出最大调用堆栈大小
似乎 Date.today()无效(正确)..
部分代码:
$('#select-date').datepicker({
dateFormat: 'dd-mm-yy',
firstDay: 1, // Monday
minDate: 0,
defaultDate: Date.today(),
dayNames: [
EALang['sunday'], EALang['monday'], EALang['tuesday'], EALang['wednesday'],
EALang['thursday'], EALang['friday'], EALang['saturday']],
dayNamesShort: [EALang['sunday'].substr(0,3), EALang['monday'].substr(0,3),
EALang['tuesday'].substr(0,3), EALang['wednesday'].substr(0,3),
EALang['thursday'].substr(0,3), EALang['friday'].substr(0,3),
EALang['saturday'].substr(0,3)],
dayNamesMin: [EALang['sunday'].substr(0,2), EALang['monday'].substr(0,2),
EALang['tuesday'].substr(0,2), EALang['wednesday'].substr(0,2),
EALang['thursday'].substr(0,2), EALang['friday'].substr(0,2),
EALang['saturday'].substr(0,2)],
monthNames: [EALang['january'], EALang['february'], EALang['march'], EALang['april'],
EALang['may'], EALang['june'], EALang['july'], EALang['august'], EALang['september'],
EALang['october'], EALang['november'], EALang['december']],
prevText: EALang['previous'],
nextText: EALang['next'],
currentText: EALang['now'],
closeText: EALang['close'],
onSelect: function(dateText, instance) {
FrontendBookApi.getAvailableHours(dateText);
FrontendBook.updateConfirmFrame();
},
onChangeMonthYear: function(year, month, instance) {
var currentDate = new Date(year, month - 1, 1);
FrontendBookApi.getUnavailableDates($('#select-provider').val(), $('#select-service').val(),
currentDate.toString('yyyy-MM-dd'));
}
});
答案 0 :(得分:1)
我在下面的场景中遇到了类似的异常,我能够解决它。
Jquery 尝试获取元素时抛出堆栈溢出异常,元素超过 130000。 下面一行抛出错误
$(dom).find(".elemCssClass")
下面的代码行结果
Uncaught RangeError: Maximum call stack size exceeded
at Function.se [as find] (app.js?typeSpec=hx%3AHxOrdTargetResolver&version=1622436777340:45)
at k.fn.init.find (app.js?....
我使用了 document.getElementByClassName(".class")
。它支持dom中的大量元素。