Hi
I'm using the following code to hide all options apart from Daily and Weekly, which is works fine.
I now want to have the Daily option checked by default, so added the line of code below, but can't seem to get it working.
Can you please help.
Thanks, Ben
I'm using the following code to hide all options apart from Daily and Weekly, which is works fine.
$(".rsRecurrenceOptionList").children().each(function (i) {
if (i <
1
|| i > 2)
$(this).hide();
});
I now want to have the Daily option checked by default, so added the line of code below, but can't seem to get it working.
$(".rsRecurrenceOptionList li:eq(1) span input").attr("checked", "checked");
Can you please help.
Thanks, Ben
4 Answers, 1 is accepted
0
Hi Ben,
I can also refer to the the Handling FormCreated event where in the Make changes in the recurrence editor section is shown how to check it on the server side.
Hope this will help.
Regards,
Plamen Zdravkov
the Telerik team
If you want to check only Daily Checkbox with jQuery you can use the following code that worked at my side:
$(
".rsRecurrenceOptionList"
).children().each(
function
(i) {
if
(i < 1 || i > 2)
$(
this
).hide();
});
$(
".rsRecurrenceOptionList li:eq(1) input"
).attr(
"checked"
,
"checked"
);
I can also refer to the the Handling FormCreated event where in the Make changes in the recurrence editor section is shown how to check it on the server side.
Hope this will help.
Regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ben
Top achievements
Rank 1
answered on 03 Mar 2012, 11:29 AM
Hi
I've added the line...
and the daily option box is now checked, but the daily options are not visible until it is clicked again.
Print screen attached, is what is displayed on first load.
Thanks, Ben
I've added the line...
$(".rsRecurrenceOptionList li:eq(1) input").attr("checked", "checked");
and the daily option box is now checked, but the daily options are not visible until it is clicked again.
Print screen attached, is what is displayed on first load.
Thanks, Ben
0
Accepted
Hi Ben,
Hope this will help you.
All the best,
Plamen Zdravkov
the Telerik team
You can trigger the click event as in the code bellow:
$telerik.$(
".rsRecurrenceOptionList li:eq(1) input"
).click();
Hope this will help you.
All the best,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ben
Top achievements
Rank 1
answered on 05 Mar 2012, 11:44 PM
Thanks Plamen.