How do I set the language for datetimepicker?

前端 未结 2 951
耶瑟儿~
耶瑟儿~ 2021-01-18 19:16

Is there any property to set the language for datetimepicker?

When displaying the calendar, that is - if I want the week days to be displayed in Spanish, for example

2条回答
  •  灰色年华
    2021-01-18 19:39

    You can change culture for thread:

     System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("es-ES");
     System.Threading.Thread.CurrentThread.CurrentCulture = culture;
     System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
    

提交回复
热议问题