Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Created Issue: 'getFullYear' exception in Sys.Extended.UI.CalendarBehavior.prototype._convertToUTC [27231]

$
0
0
I am getting an "Microsoft JScript runtime error: Object doesn't support property or method 'getFullYear'" exception when trying to use the CalendarExtender control. Deep down, the exception occurs at this line:

_parseTextValue: function (c) {
var b = a;
if (c) b = this._convertToUTC(Date.parseLocale(c, this.get_format())); <----- here
if (isNaN(b)) b = a;
return b
}

..it would appear that _convertToUTC expects a Date object but "Date.parseLocale(c, this.get_format())" is returning a number, causing the exception. In particular, c = "7/30/2012" and this.get_format() = "M/d/yyyy", returning 1343631600000 as the result.

To fix this, if there was a way to inject a "new Date" around the Date.parseLocale, this function would work, such that:

Sys.Extended.UI.CalendarBehavior.prototype._convertToUTC = function (a) {
if (!a) return a;
if (!isNaN(parseFloat(a)) && isFinite(a)) a = new Date(a);
a = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds()));
return a;
};


..is there a way to patch this from my end or do I need to wait for another version to fix this?


Thank you,
mycall


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>