Unplanned
Last Updated: 01 Feb 2019 05:54 by Shalin
Shalin
Created on: 31 Jan 2019 13:58
Category: Calendar & Scheduling
Type: Feature Request
2
Calendar: [iOS] First day of week is not changed per Locale
When the phone language and region are set to "Russian", for example, first day of week should be Monday. Currently it stays Sunday on iOS.
1 comment
Shalin
Posted on: 01 Feb 2019 05:54

by using renderer we can achieve expected behavior 

public class WeekCalendarRenderer : CalendarRenderer
    {
        protected override void OnElementChanged (ElementChangedEventArgs<RadCalendar> e)
        {
            base.OnElementChanged(e);
            if (Control?.Calendar != null && Element != null)
            {
                NSCalendar calendar = new NSCalendar(NSCalendarType.Gregorian);
                calendar.Locale = NSLocale.CurrentLocale;

                this.Control.Calendar = calendar;
            }
        }       
    }