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

Closed Issue: MaskedEditBehavior. ConvFmtTime : function(input,loadFirst) fails if this._CultureAMPMPlaceholder == "" [26456]

$
0
0
If the this._CultureAMPMPlaceholder == "", ConvFmtTime fails when creating a regular expression: Microsoft JScript runtime error: Expected ')' in regular expression

CODE:
-------
, ConvFmtTime : function(input,loadFirst)
{

//.......

var LDLcAM = "";
var LDLcPM = "";
if (this._CultureAMPMPlaceholder != "") //// FALSE so LDLcAM and LDLcPM remains empty
{
LDLcAM = this._CultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[0];
LDLcPM = this._CultureAMPMPlaceholder.split(this._AMPMPlaceholderSeparator)[1];
}
// convert current Culture to user culture format (24H)
if (this.get_UserTimeFormat() == AjaxControlToolkit.MaskedEditUserTimeFormat.TwentyFourHour) //// TRUE
{
input = input.replace(new RegExp("(\\" + LDLcAM + ")", "g"),""); //// RegExp string goes "(\\)" resp. (\), which leads to error
if (input.indexOf(LDLcPM) != -1)
{
AddH = 12;
}
input = input.replace(new RegExp("(\\" + LDLcPM + ")", "g"),"");
}

//.....
}
Comments: Issues is closed as we are not able to reproduce. Please reopen with sample code if someone still getting problem with this issue.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



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