We recently updated jQuery from 1.4.2 to 1.6.1, and jQueryUI from 1.8.4 to 1.8.12.
In our testing, we've had no serious issues excepting one:
We have a custom control that uses a datepicker and updates a dropdown of formats when a new date is selected. Now, when you select a date you get the following error:
'length' is null or not an object
WebResource.axd
Prior to this upgrade, this was working fine in all modern browsers. Since the upgrade, it has stopped working in IE (64-bit machine running windows 7, IE 8, compatibility mode doesn't matter) for our testers. It still seems to work in XP.
A related question was asked way back in '09 and it got a very good answer.
I've tried implementing that, and it breaks the 'Update the dropdownlist' portion of the functionality.
The control is initialized by calling this function, passing in the control as $scope:
function InitializeCalendarDateControl($scope) {
CalendarDateControl_FirstTimeThrough = true;
$("input.date", $scope).datepicker({ changeMonth: true, changeYear: true, yearRange: '1850:c+5'});
var groupedControls = $("div.CalendarDateControlCssClass[groupname!=]", $scope);
--snip some control hiding stuff
--snip some time format validation stuff
if (!$scope.hasClass("CalendarDateControlCssClass")) {
$("input.hasDatepicker, input.hh, input.mm, select.dates, select.ampm", $scope).live("change", function () {
CalendarDateControl_FirstTimeThrough = false;
updateControls($(this));
});
if (groupedControls.length > 0) {
$("div.CalendarDateControlCssClass", $scope).each(function () {
updateControls($(this).children("input:eq(0)"));
});
}
} else {
$("input.hasDatepicker, input.hh, input.mm, select.dates, select.ampm", $scope).live("change", function () {
CalendarDateControl_FirstTimeThrough = false;
updateControls($(this));
});
if (groupedControls.length > 0) {
updateControls($scope.children("input:eq(0)"));
}
}
}
The updateControls function is the function that updates the dropdown list.
Using the fix linked in the answer above, the change events don't seem to fire.
What can I do to fix this?