Unplanned
Last Updated: 05 Jan 2021 11:27 by ADMIN
Mehdi
Created on: 02 Jan 2021 22:39
Category: Calendar & Scheduling
Type: Feature Request
0
Being able to change time format in RadCalendar's Day/MultiDay view modes

Dear sir/madam,

Following a forum post discussion regarding the RadCalendar's time format in Day/MultiDay view modes, it has been said that its time format is set based on the device's settings, and is not changeable by the developer. So, please add this feature so that the developer can at least set the RadCalendar's time format to either 24 or 12-Hour formats, not only in Day/MultiDay view modes but on any view mode.

Many thanks in advance

2 comments
ADMIN
Didi
Posted on: 05 Jan 2021 11:27

Hello Mehdi,

I have changed the status to Unplanned. Please find your Telerik points updated as a small sign of gratitude for bringing this feature request to our attention. 

Solution on Android:

You will need to implement a custom renderer and set the TimeLabelFormat property.

Example:

using Android.Content;
using App5.Droid;
using Java.Util;
using Telerik.XamarinForms.InputRenderer.Android;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;

[assembly: ExportRenderer(typeof(Telerik.XamarinForms.Input.RadCalendar), typeof(CustomCalendarRenderer))]


namespace App5.Droid
{
    public class CustomCalendarRenderer : CalendarRenderer
    {
        public CustomCalendarRenderer(Context context) : base(context)
        {

        }

        protected override void OnElementChanged(ElementChangedEventArgs<Telerik.XamarinForms.Input.RadCalendar> e)
        {
            base.OnElementChanged(e);

            var control = Control;

            control.MultiDayView.DayEventsViewStyle.TimeLabelFormat = new Java.Text.SimpleDateFormat("HH:mm:ss", Locale.Us);
            control.DayView.DayEventsViewStyle.TimeLabelFormat = new Java.Text.SimpleDateFormat("HH:mm:ss", Locale.Us);
        }
    }
}

For AgendaView there is a date and time format settings option. Please check here for more details https://docs.telerik.com/devtools/xamarin/controls/calendar/view-modes/calendar-agendaview#date-and-time-format-settings  

About MonthView mode, there isn't a time ruler and I am afraid this scenario is not valid for month view. 

 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Mehdi
Posted on: 02 Jan 2021 22:45

Hi again,

After changing the request's content for the change being available in all view modes, I forgot to remove the "Day/MultiDay view modes" in the title. So, if possible, please change the title to: Changing RadCalendar's time format.