How do I set the language for datetimepicker?

2019-02-24 07:58发布

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条回答
ゆ 、 Hurt°
2楼-- · 2019-02-24 08:28

You can't change the culture, which contains weekdays names among other things, on a single control like the DateTimePicker, but at thread level.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-02-24 08:28

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;
查看更多
登录 后发表回答