It's not easy to use the Ajax Toolkit controls like the example in
here
for editing a date.
Well, at least not easy if you want it to be multicultural.
I used the following:
//Set the culture settings
CultureInfo oCulture = CultureInfo.CurrentCulture;
CalendarMaskExtender1.CultureName = oCulture.Name;
CalendarExtender1.Format = oCulture.DateTimeFormat.ShortDatePattern;
//CalendarMaskExtender expects something like "99/99/9999"
CalendarMaskExtender1.Mask = CalendarExtender1.Format.Replace(
oCulture.DateTimeFormat.DateSeparator, "/").Replace(
"d", "9").Replace(
"M", "9").Replace(
"y", "9");
And don't forge tot set the <asp:ScriptManager EnableScriptGlobalization="true">
Argh, how do you set the format on this blogger.....aahh, just view source of this page if you need to check the code..
Etiquetas: ajax