Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 217
Jack Johnstone Avatar asked Jun 30 '10 10:06

Jack Johnstone


People also ask

How do you set MinDate on DateTimePicker?

Step 1: Create a DateTimePicker using the DateTimePicker() constructor is provided by the DateTimePicker class. // Creating a DateTimePicker DateTimePicker dt = new DateTimePicker(); Step 2: After creating DateTimePicker, set the MinDate property of the DateTimePicker provided by the DateTimePicker class.

How do I make datepicker textbox editable?

$('#start_date'). datetimepicker({timeFormat: "HH:mm:ss", dateFormat:"dd-mm-yy", constrainInput: false, maxDate: maxdate}); API information constrainInput + API documentation for further documentation if you need any.

How do I use datepicker?

The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.


2 Answers

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;
like image 161
Iale Avatar answered Sep 27 '22 17:09

Iale


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

like image 21
Johan Buret Avatar answered Sep 27 '22 17:09

Johan Buret