time format in AppointmentEditDialog

2 posts, 0 answers
  1. acasegra
    acasegra avatar
    4 posts
    Member since:
    Apr 2011

    Posted 16 Mar 2012 Link to this post

    Hi im spanish and i apologice beacuse mi enlglish is no so well

    The time format in AppointmentEditDialog is in 12 hours and I need see it in 24h
    ¿who can i chenge it?

  2. Ivan Todorov
    Ivan Todorov avatar
    688 posts

    Posted 21 Mar 2012 Link to this post

    Hi acasegra,

    Thank you for your question.

    You can achieve this by creating a custom EditAppointmentDialog and changing the Culture of the time pickers:

    public class MyEditAppointmentDialog : EditAppointmentDialog
        protected override void OnLoad(EventArgs e)
            this.timeStart.Culture = System.Globalization.CultureInfo.InvariantCulture;
            this.timeEnd.Culture = System.Globalization.CultureInfo.InvariantCulture;

    To put the above custom dialog in use, you need to handle the AppointmentEditDialogShowing event of RadScheduler as it is shown below:
    void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e)
        e.AppointmentEditDialog = new MyEditAppointmentDialog();

    I hope this helps. Feel free to ask if you have any further questions.

    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top