MaskEditExtender of AjaxtoolKit-1.0.10618.0 does not work properly for all the cultures. When the culture of the thread is set Hungarian (hu-HU), MaskEditExtender throws error.
The reason for this is, In MaskEditExteder code the DateSeperator for all the cultures is assumed to be a character long. This is true for all the languages except Hungarian (hu-HU), in which the DateSeperator is “. ” (dot followed by space). This special case is not handled in the extender code.
To fix this problem replace the following code in the MaskedEditExtender.cs file.
Code to be replaced:
char sep = System.Char.Parse(CultControl.DateTimeFormat.DateSeparator);
string[] arrDate = CultControl.DateTimeFormat.ShortDatePattern.Split(Sep);
Correct code:
//char[] sep = System.Char.Parse(CultControl.DateTimeFormat.DateSeparator);
string[] arrDate = CultControl.DateTimeFormat.ShortDatePattern.Split(CultControl.DateTimeFormat.DateSeparator.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
Comments: Issue is closed as changes are already done in the previous releases.
The reason for this is, In MaskEditExteder code the DateSeperator for all the cultures is assumed to be a character long. This is true for all the languages except Hungarian (hu-HU), in which the DateSeperator is “. ” (dot followed by space). This special case is not handled in the extender code.
To fix this problem replace the following code in the MaskedEditExtender.cs file.
Code to be replaced:
char sep = System.Char.Parse(CultControl.DateTimeFormat.DateSeparator);
string[] arrDate = CultControl.DateTimeFormat.ShortDatePattern.Split(Sep);
Correct code:
//char[] sep = System.Char.Parse(CultControl.DateTimeFormat.DateSeparator);
string[] arrDate = CultControl.DateTimeFormat.ShortDatePattern.Split(CultControl.DateTimeFormat.DateSeparator.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
Comments: Issue is closed as changes are already done in the previous releases.