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

Edited Issue: Access of undefined array in MaskedEditBehavior [27921]

$
0
0
There is a bug in Sys.Extended.UI.MaskedEditBehavior.prototype.ConvFmtTime, where an undefined Array is accessed. It can easily be seen, when looking at the source:

```
ConvFmtDate: function(input, loadFirst) {
var m_arrDateLD,
m_arrDate;

m_arrDate = input.split(this.get_CultureDatePlaceholder()).filter(function(element) {
return element != "";
});
m_arrDate = m_arrDate.map(function(element) {
return element.replace(/[^\/\d]/g, '')
});

if(loadFirst) {
if(this.get_UserDateFormat() != Sys.Extended.UI.MaskedEditUserDateFormat.None) {
[...]

m_arrDate[this.get_CultureDateFormat().indexOf("D")] = m_arrDateLD[this._CultureDateFormat.indexOf("D")];
m_arrDate[this.get_CultureDateFormat().indexOf("M")] = m_arrDateLD[this._CultureDateFormat.indexOf("M")];
m_arrDate[this.get_CultureDateFormat().indexOf("Y")] = m_arrDateLD[this._CultureDateFormat.indexOf("Y")];
}
}
[...]
```
the Array "m_arrDateLD" is never defined, but when "loadFirst" is true, its values are read.
This JS-error only happens when the page is loaded (loadFirst) but it causes all following scripts to fail, which makes this component of the Toolkit de facto unusable

Viewing all articles
Browse latest Browse all 4356

Trending Articles