title | description | type | page_title | slug | tags | res_type | ticketid |
---|---|---|---|---|---|---|---|
Setting the Display Format of RadDatePicker's TextBox |
How to change the date format used for the RadDatePicker's selected date. |
how-to |
Customize the DateTime Format of the Selected Date in RadDatePicker |
kb-datepicker-set-date-format |
raddatepicker, wpf, date format, cultureinfo, datetimeformat |
kb |
1672177 |
Product | RadDatePicker for WPF |
Version | 2024.3.821 |
How to change the default date-time format for the selected date in RadDatePicker.
You can assign the Culture
property of the RadDatePicker. This way you can use the DateTimeFormat
of the CultureInfo
object.
{{region kb-datepicker-set-date-format-0}} var culture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone(); culture.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy"; this.radDatePicker.Culture = culture; {{endregion}}