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

Posted by: dan.mihai on 25 January 2020, 12:26 am EST

    • Post Options:
    • Link

    Posted 25 January 2020, 12:26 am 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.

    Regards,

    Deepankar

  • Posted 27 January 2020, 10:20 am EST

    Hi,

    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(scheduler1, “time”);

    if (timeCtrl != null)

    {

    timeCtrl.Text = Convert.ToDateTime(timeCtrl.Text).ToString(“HH:mm”);

    }

    Thanks,
    Ruchir
  • Posted 7 May 2023, 2:30 am EST

Need extra support?

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

Learn More

Forum Channels