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
6 Answers, 1 is accepted
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.
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 ?
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.
Hi ,
Thanks Plamen . I solved the issue.
Regards,
Chethan Y
Hi Chethan,
I have same issue I need to translate the days, How did you resolved it?
Thank you
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/.