C1Scheduler appointment label time - stuck to en-US format?

Posted by: dan.mihai on 24 January 2020, 3:26 pm EST

  • Posted 24 January 2020, 3:26 pm EST

    Anybody knows how to fix this?

    The time scale on the left in Day View follows the C1Scheduler.TimeFormat property, however the content inside AppointmentsCoverPane refuses to switch away from the en-US 12-hour format to a 24 hour / military format (seems to be hardcoded internally and can't be changed through a new C1Scheduler.IntervalAppointmentTemplate either : https://www.grapecity.com/samples/c1scheduler-intervalappointmenttemplate does not work.)

    Highly annoying bug - perhaps there is some way to patch this? GrapeCity does not seem to be interested in adding a fix:


    Replied 8 September 2017, 11:30 pm EST

    Hello JensBo,

    Sorry for the late response on this issue.

    I have gone through your requirement. Unfortunately, I could not find any solution to change the time format for the appointment text.

  • Marked as Answer

    Replied 27 January 2020, 1:20 am EST


    If I understand your requirement correctly, you can access the element (TextBlock) used to display Time through VisualTreeHelper and set it's format, as something like:
    var timeCtrl = FindChild<TextBlock>(scheduler1, "time");
    if (timeCtrl != null)
    timeCtrl.Text = Convert.ToDateTime(timeCtrl.Text).ToString("HH:mm");
    *Just make sure to access the element only after the UI has rendered.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels