I just ran into a problem that stumped me for a while, and I don't see an SO question for it when I search, so I'm going to post it here to help folks who make the same (really dumb but hard to see) mistake. If nobody gets it in an hour, I'll post the answer.
What is my mistake?
$('.myEndDate').each(new function (index) {
$(this).datepicker(
{
changeMonth: true,
numberOfMonths: 1,
onClose: function (selectedDate) {
$('.myStartDate').datepicker("option", "maxDate", selectedDate);
}
});
});
The result is that firefox throws up this lovely error from inside the minified jqueryUI javascript:
TypeError: e.nodeName is undefined
http://localhost:8080/MyUI/scripts/jquery-ui-1.10.2.custom.min.js Line
1322
When I debug in firebug, it seems that this
is
this Object {}
It's possible I'm the only one who ever had trouble finding this mistake, and that's why I didn't find a question for it. Just in case someone else has a similar brain fart, maybe I can save them some time :)