Localization of "ajaxToolkit: CalendarExtender"

I use ajaxToolkit:CalendarExtenderin my multilingual project. The problem with this calendar is that it localizes the month lines in the control, but does not localize the Today line, and I also need to localize this text.

Please help me with this problem.

+3
source share
2 answers

try it

protected void CalendarExtender1_Load(object sender, EventArgs e)
    {

        CalendarExtender1.TodaysDateFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
        // or
        //CalendarExtender1.TodaysDateFormat = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern;

    }
0
source

Try changing the ScriptManager.EnableScriptGlobalization property to True. It should work as long as you set the desired cutlture value.

    protected void Page_Load(object sender, EventArgs e)
{
    string Lang = "es-MX";//set your culture here
    System.Threading.Thread.CurrentThread.CurrentCulture =
        new System.Globalization.CultureInfo(Lang);
}
+1
source

Source: https://habr.com/ru/post/1723430/


All Articles