Shamsi and Persian Scheduler

2 posts, 0 answers
  1. zahed
    zahed avatar
    1 posts
    Member since:
    Jun 2013

    Posted 01 Jun 2015 Link to this post

    hi everyone

     i use Scheduler in  project and i have problem in shamsi Scheduler?

    everyting in ok but month is not shamsi 

    i use this code


    private readonly Calendar cal;
    private readonly Calendar[] optionals;
    public PersianCulture()
        : this("fa-IR", true)
    public PersianCulture(string cultureName, bool useUserOverride)
        : base(cultureName, useUserOverride)
        //Temporary Value for cal.
        cal = base.OptionalCalendars[0];
        //populating new list of optional calendars.
        var optionalCalendars = new List<Calendar>();
        optionalCalendars.Insert(0, new PersianCalendar());
        Type formatType = typeof(DateTimeFormatInfo);
        Type calendarType = typeof(Calendar);
        PropertyInfo idProperty = calendarType.GetProperty("ID", BindingFlags.Instance | BindingFlags.NonPublic);
        FieldInfo optionalCalendarfield = formatType.GetField("optionalCalendars",
                                                              BindingFlags.Instance | BindingFlags.NonPublic);
        //populating new list of optional calendar ids
        var newOptionalCalendarIDs = new Int32[optionalCalendars.Count];
        for (int i = 0; i < newOptionalCalendarIDs.Length; i++)
            newOptionalCalendarIDs[i] = (Int32)idProperty.GetValue(optionalCalendars[i], null);
        optionalCalendarfield.SetValue(DateTimeFormat, newOptionalCalendarIDs);
        optionals = optionalCalendars.ToArray();
        cal = optionals[0];
        DateTimeFormat.Calendar = optionals[0];
        DateTimeFormat.MonthNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
        DateTimeFormat.MonthGenitiveNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
        DateTimeFormat.AbbreviatedMonthNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
        DateTimeFormat.AbbreviatedMonthGenitiveNames = new[] { "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" };
        DateTimeFormat.AbbreviatedDayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };//{ "ی", "د", "س", "چ", "پ", "ج", "ش" };
        DateTimeFormat.ShortestDayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };//{ "ی", "د", "س", "چ", "پ", "ج", "ش" };
        DateTimeFormat.DayNames = new string[] { "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" };
        DateTimeFormat.AMDesignator = "ق.ظ";
        DateTimeFormat.PMDesignator = "ب.ظ";
        DateTimeFormat.ShortDatePattern = "yyyy/MM/dd";
        DateTimeFormat.LongDatePattern = "yyyy/MM/dd";
        DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy/MM/dd"}, 'd');
        DateTimeFormat.SetAllDateTimePatterns(new[] {"dddd, dd MMMM yyyy"}, 'D');
        DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy MMMM"}, 'y');
        DateTimeFormat.SetAllDateTimePatterns(new[] {"yyyy MMMM"}, 'Y');
    public override Calendar Calendar
        get { return cal; }
    public override Calendar[] OptionalCalendars
        get { return optionals; }

    how i fix this problem .


  2. Hristo Merdjanov
    Hristo Merdjanov avatar
    674 posts

    Posted 04 Jun 2015 Link to this post

    Hi Zahed,

    Thank you for writing.

    RadScheduler provides localization support out of the box. You can find detailed information, a list of the available features and examples in the following section of our documentation: RadScheduler | Localization.

    Could you please share in details how exactly you imagine the Shamsi RadScheduler and what features it should incorporate?

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Hristo Merdjanov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top