fix for a "too much recursion" JavaScript error in calendar.js, when the user tries to pick another year; the fix was taken from dynarch.com

provided by a user named ilyaf. Thanks,
This commit is contained in:
Klaus Leithoff 2008-08-11 08:01:28 +00:00
parent 20a5ce1293
commit ace6deee7b

View File

@ -1774,6 +1774,7 @@ Date.prototype.print = function (str) {
return str;
};
if ( !Date.prototype.__msh_oldSetFullYear ) {
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
@ -1782,7 +1783,7 @@ Date.prototype.setFullYear = function(y) {
this.setDate(28);
this.__msh_oldSetFullYear(y);
};
};
// END: DATE OBJECT PATCHES