This is a migrated thread and some comments may be shown as answers.

DateTime Format in “Today” Section of Control

2 Answers 81 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 23 May 2013, 12:09 AM
Hi there,

I’d like to change the format which the calendar control uses to display the current date, to the left of the "Today" button. (Please see the attached screenshot –  it's the format of the section circled in red which I’d like to change.) I’m specifically trying to use dd/MM/yy and have already tried this:

radDateTimePicker1.Format = DateTimePickerFormat.Custom;

radDateTimePicker1.CustomFormat = "dd/MM/yy";

Would you please describe how to change the date format to the left of the “Today” button?

Thank you,

Ben

2 Answers, 1 is accepted

Sort by
0
Anton
Telerik team
answered on 27 May 2013, 12:42 PM
Hi Ben,

Thank you for writing.

In order to change the formatting of the described label, you should first access the calendar that pops up. The following code snippet demonstrates how to access the calendar and how to access its label:
RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;
RadCalendar calendar = calendarBehavior.Calendar as RadCalendar;
 
calendar.ShowFooter = true;
calendar.CalendarElement.CalendarStatusElement.LableFormat = "MM/dd/yyyy";

I hope this helps.

Regards,
Anton
Telerik
RadChart for WinForms is obsolete. Now what?
0
Ben
Top achievements
Rank 1
answered on 28 May 2013, 08:22 PM

Hi Anton,

Your solution works perfectly – thank you so much. I really appreciate your help!

Cheers,

Ben

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Ben
Top achievements
Rank 1
Answers by
Anton
Telerik team
Ben
Top achievements
Rank 1
Share this question
or