Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.01 KB

kb-datepicker-set-date-format.md

File metadata and controls

41 lines (33 loc) · 1.01 KB
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

Environment

Product RadDatePicker for WPF
Version 2024.3.821

Description

How to change the default date-time format for the selected date in RadDatePicker.

Solution

You can assign the Culture property of the RadDatePicker. This way you can use the DateTimeFormat of the CultureInfo object.

[C#]

{{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}}