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

Commented Issue: MaskedEdit causes error in JScript when working with 2-digits year [11758]

$
0
0
When working with 2-digits year represetation maks like this: 99/99/99 99:99:99, crash occurs in MaskedEditBehavior.js, when onblur event is called. The problem is in AutoFormatDate. It has the following block:

if (Y4)
{
Ycur = CurDate.getUTCFullYear().toString();
}
else
{
Ycur = Ycur.substring(2);
}

Obviously, when Y4 is false, Ycur is never initialized and "object undefined" error occurs. This code should be changed to

Ycur = CurDate.getUTCFullYear().toString();
if (!Y4)
{
Ycur = Ycur.substring(2);
}
Comments: My bad! The short date bug is NOT fixed as previously stated. Sorry.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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