Jack Johnstone
Jack Johnstone

Reputation: 1535

How do I set the language for datetimepicker?

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...

Upvotes: 8

Views: 17569

Answers (2)

Iale
Iale

Reputation: 678

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;

Upvotes: 5

Johan Buret
Johan Buret

Reputation: 2634

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

Upvotes: 2

Related Questions