3 Answers, 1 is accepted
You can easily achieve it with the following code by using onClientFormCreated event of RadScheduler:
function
OnClientFormCreated(sender, args) {
var
$ = $telerik.$;
$(
".rsRecurrenceOptionList "
).on(
"click"
,
function
myfunction() {
alert(1);
});
}
Hope this will be helpful.
Kind regards,
Plamen
the Telerik team
function pageLoad() {
var $ = $telerik.$;
$(
".RecurrenceEditor").children().each(function(i) {
if (i == 0)
$($($(
this).children()[0]).children()[0]).attr("checked", "checked");
else if (i == 1)
this.style.display = "block";
});
var rruleControl = parent.document.getElementById("hdnRRule");
var rrule;
if (rruleControl != null) {
rrule = rruleControl.value;
if (!!rrule) {
var recurrenceEditorJQuery = $("[id$='RecurrencePatternEditor']");
var recurrenceEditor = $find(recurrenceEditorJQuery.attr("id"));
if (recurrenceEditor != null) {
recurrenceEditor.set_recurrenceRule(rrule);
}
}
}
}
function OnClientFormCreated(sender, eventArgs) {
$telerik.$(
".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:first-child").hide();
$telerik.$(
".rsRecurrenceOptionList").on("click", function selecteditemclick() {
alert(1);
});
}
The alert does not fire.
I also have a second issue. When i try to set the recurrence rule for the radschedulerrecurrenceeditor control using
recurrenceEditor.set_recurrenceRule(rrule); I get an error "Microsoft JScript runtime error< Object doesn't support property or method 'get_pattern' >
I have EnableEmbeddedScript = "true" so its using the embedded script in the Telerik.Web.UI
My current version of Telerik.Web.UI.dll is 2012.2.724.35
Is the embedded script for RecurrenceEditor.js or RecurrenceRule.js missing that method? I think it's the latter, because the get_pattern is being called on the recurrence rule.
I have tested the scenario you described but could not observe any unusual behavior. I am attaching my test web page. Would you please review it and let us know if your scenario is somehow different so we could be more helpful?
Plamen
the Telerik team