DateTime Format in “Today” Section of Control

3 posts, 0 answers
  1. Ben
    Ben avatar
    6 posts
    Member since:
    Mar 2013

    Posted 22 May 2013 Link to this post

    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,


  2. Anton
    Anton avatar
    167 posts

    Posted 27 May 2013 Link to this post

    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.

    RadChart for WinForms is obsolete. Now what?
  3. Ben
    Ben avatar
    6 posts
    Member since:
    Mar 2013

    Posted 28 May 2013 Link to this post

    Hi Anton,

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



Back to Top