Is it possible to add custom localization to days displayed in RadSchedulerRecurrenceEditor and can the dropdown order of monthly options be changed ?

7 posts, 1 answers
  1. Chethan
    Chethan avatar
    5 posts
    Member since:
    Apr 2015

    Posted 29 Apr 2015 Link to this post

     Hi Telerik Team,

         I am using RadSchedulerRecurrenceEditor. I want to add Custom localization to the days displayed in the control i,e Monday -> Mandag and so on. So, is it possible to change it ? I even want to check out whether the dropdown display order of the monthly Options of the control could be changed ? Please find the attachment. Waiting for best possible solution.

     

    Regards,

    Chethan Y

  2. Plamen
    Admin
    Plamen avatar
    3076 posts

    Posted 01 May 2015 Link to this post

    Hi,

    You can refer to his online demo and this help topic where is described how a similar localization can be achieved. As for the order of the items -here is the code that worked correctly at my side:
    function OnClientFormCreated(sender, args) {
                  var $ = $telerik.$;
                  var comboObject = $("[id$='MonthlyDayMaskDropDown']");
                  var combo = $find(comboObject.attr("id"));
                  combo.add_dropDownOpening(dropDownOpening);
              }
     
              function dropDownOpening(sender, args) {
                  var $ = $telerik.$;
                   
                  var sunday = sender.findItemByText("Sunday");
                  var items = sender.get_items();
     
                  items.remove(sunday);
                  items.add(sunday);
              }

    Hope this information will be helpful.

    Regards,
    Plamen
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Chethan
    Chethan avatar
    5 posts
    Member since:
    Apr 2015

    Posted 07 May 2015 in reply to Plamen Link to this post

    Hi,

         OnClientFormCreated(sender, args) is a clide side event for radscheduler i think but i am looking out for RadSchedulerRecurrence editor. I could not find any of the client events associated with the control. So, is there any other way to achieve the solution ?

  4. Answer
    Plamen
    Admin
    Plamen avatar
    3076 posts

    Posted 11 May 2015 Link to this post

    Hello,

    In case you are only using the RecurrenceEditor you can use the pageLoad event of the page when the control is already rendered.

    Hope this will help you solve the issue

    Regards,
    Plamen
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  5. Chethan
    Chethan avatar
    5 posts
    Member since:
    Apr 2015

    Posted 14 May 2015 in reply to Plamen Link to this post

    Hi ,

          Thanks Plamen . I solved the issue.

    Regards,

    Chethan Y

  6. Ryan
    Ryan avatar
    1 posts
    Member since:
    Nov 2020

    Posted 22 Nov 2020 in reply to Chethan Link to this post

    Hi Chethan,

    I have same issue I need to translate the days, How did you resolved it? 

    Thank you

     

     

  7. Peter Milchev
    Admin
    Peter Milchev avatar
    880 posts

    Posted 25 Nov 2020 Link to this post

    Hello Ryan,

    Here is a simple script executed on the Sys.Application.Load event which can be adapted also for the OnClientFormCreated event.

    function translateRecurrenceEditorDays() {
        var translations = {
            "Sun": "TranslatedSun",
            "Mon": "TranslatedMon",
            "Tue": "TranslatedTue",
            "Wed": "TranslatedWed",
            "Thu": "TranslatedThu",
            "Fri": "TranslatedFri",
            "Sat": "TranslatedSat",
        };
    
        $telerik.$(".rsAdvWeekly_WeekDays >li>span>label").each(function (ind, elem) {
            var txt = $telerik.$(elem).text().trim();
            var translatedText = translations[txt];
            if (translatedText) {
                $telerik.$(elem).text(translatedText);
            }
        })
        // Sys.Application.remove_load(translateRecurrenceEditorDays);
    }
    Sys.Application.add_load(translateRecurrenceEditorDays);

     

    Regards,
    Peter Milchev
    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/.

Back to Top