Use "fr-CH" as culture for you user session (or for your whole appl) and you'll get this very format (I mean "dd.mm.yyyy"). It works fine for MaskEditExtender coupled with a MaskEditValidator and with CalendarExtender as well.
The "Mask" property seems subordinate to the current culture. "." will be display as separator when current culture is "fr-CH" regarless if you put an "/" in it. ("-" will be displayed if using the "fr-CA" culture (which is mine))
myControl_MaskedEditExtender.CultureName = MyCurrentSession.CurrentCulture.Name;
myControl_MaskedEditExtender.Mask = GetCurrentCultureShortDateMask();
Note: It seems for instance that Ajax needs "/" as separator in the
Mask property otherwise I get runtime errors. I use something not very elegant instead, but that's the best I found so far:
private string GetCurrentCultureShortDateMask()
{
bool bln_Got_d = false;
bool bln_Got_M = false;
string str_DataPattern = MyCurrentSession.CurrentCulture.DateTimeFormat.ShortDatePattern;
StringBuilder sb_Mask = new StringBuilder(str_DataPattern.Length);
foreach (char c in str_DataPattern)
switch (c) {
case 'y':
sb_Mask.Append('9'); break;
case 'd':
if (bln_Got_d)
break;
bln_Got_d = true;
sb_Mask.Append("99");
break;
case 'M':
if (bln_Got_M)
break;
bln_Got_M = true;
sb_Mask.Append("99");
break;
default:
sb_Mask.Append('/');
break;
}
return sb_Mask.ToString();
}