Hello,
I am using rad recurrence editor in which Saturday checkbox is checked by default. In order to resolve this issue I used below script
string scriptToRegister = "$('.rsAdvWeekly_WeekDays input:checkbox').each(function (index) { $(this).attr('checked', false); });";
ScriptManager.RegisterStartupScript(this, this.GetType(), "RecurranceKey", scriptToRegister, true);
Using above script checkbox is getting unchecked but after that when I want to bind 'RecurrenceRuleText' to recurrence editor, it is not binding the rule properly. That means at the time of editing when I want Saturday checkbox as checked, so because above script it is unchecking the checkbox.
Could you please assists me on this issue?
Thanks and Regards,
Deepti
9 Answers, 1 is accepted
0
Hello Deepti,
You could subscribe to the OnFormCreated client event and add the following code in it.
I hope this will help.
Kind regards,
Ivana
the Telerik team
You could subscribe to the OnFormCreated client event and add the following code in it.
var
weekDays =
new
Array(
"Sunday"
,
"Monday"
,
"Tuesday"
,
"Wednesday"
,
"Thursday"
,
"Friday"
,
"Suturday"
);
function
OnClientFormCreated(sender, args) {
var
mode = args.get_mode();
if
(mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert) {
var
selctedDate = sender.get_selectedDate();
var
day = weekDays[selctedDate.getDay()];
$telerik.$(
'.rsAdvWeekly_WeekDays input'
).each(
function
(index, item) {
var
inputDay = item.name.split(
'WeeklyWeekDay'
)[1];
if
(inputDay == day) {
if
(item.checked ) {
item.checked =
false
;
}
}
});
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
ShowFullTime
=
"true"
OnClientFormCreated
=
"OnClientFormCreated"
>
I hope this will help.
Kind regards,
Ivana
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

deepti
Top achievements
Rank 1
answered on 26 Jun 2012, 02:12 PM
Hi Ivana,
Thanks for the reply. But I am using rad recurrence editor instead of rad scheduler. I think below function is used for rad scheduler. Could you please suggest any solution for recurrence editor?
Thanks and Regards,
Deepti
Thanks for the reply. But I am using rad recurrence editor instead of rad scheduler. I think below function is used for rad scheduler. Could you please suggest any solution for recurrence editor?
Thanks and Regards,
Deepti
0
Hi Deepti,
Hope this will be helpful.
Greetings,
Plamen Zdravkov
the Telerik team
You can use pageLoad function instead and uncheck the Saturday checkbox as in the code below where "RadSchedulerRecurrenceEditor1" is the id of RecurrenceEditor used:
document.getElementById(
"RadSchedulerRecurrenceEditor1_WeeklyWeekDaySaturday"
).checked =
false
;
Hope this will be helpful.
Greetings,
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

Kalpna
Top achievements
Rank 1
answered on 01 Apr 2014, 04:17 AM
Hello all, The following above code is not working. I am using Advanced Form for insert and update the calendar activities. If i use OnClientFormCreated then the options of Add New Activity and Add Recurrence Activity is not working. When i select Add new Recurring activity then it will check the current day in Weekly recurrence. And if i select Add new activity and check the Recurrence Box then it will not check the current day in Weekly Recurrence, it will check Saturday. Please help me. It is urgent for me.
0
Hi Kalpna,
I have tested the described behavior both locally and on our on-line demos and it worked correctly in all cases and only the checkbox of the clicked day was checked. Would you please let us know if it can be replicated on any of our demos or share the code that is not working correctly s owe could be more helpful.
Regards,
Plamen
Telerik
I have tested the described behavior both locally and on our on-line demos and it worked correctly in all cases and only the checkbox of the clicked day was checked. Would you please let us know if it can be replicated on any of our demos or share the code that is not working correctly s owe could be more helpful.
Regards,
Plamen
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

Kalpna
Top achievements
Rank 1
answered on 07 Apr 2014, 07:15 AM
Is there any way to check current day in weekly recurrence using c#??
Please help me.
I have tried many times but above code is not working.
Please help me.
I have tried many times but above code is not working.
0

Shinu
Top achievements
Rank 2
answered on 07 Apr 2014, 09:42 AM
Hi Kalpna,
The selected Date of the Radscheduler will return the Current Date only if you are not specifying any date as selected. Please have a look into the following code snippet which works fine at my end.
ASPX:
C#:
Thanks,
Shinu.
The selected Date of the Radscheduler will return the Current Date only if you are not specifying any date as selected. Please have a look into the following code snippet which works fine at my end.
ASPX:
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
SelectedView
=
"WeekView"
...>
...
</
telerik:RadScheduler
>
<
telerik:RadButton
ID
=
"RadButton1"
runat
=
"server"
Text
=
"Current Date"
OnClick
=
"RadButton1_Click"
>
</
telerik:RadButton
>
C#:
protected
void
RadButton1_Click(
object
sender, EventArgs e)
{
string
currentdate = RadScheduler1.SelectedDate.ToString();
}
Thanks,
Shinu.
0

Kalpna
Top achievements
Rank 1
answered on 07 Apr 2014, 09:50 AM
Hii Shinu,
this is not what i want.
I want to check the current day in Radschedular RecurrenceEditor. I am able to get the day of appointment day. But recurrence editor does not check the current day on Add New Appointment.
If i use Add new Recurring appointment then it will check the current day but in case of Add new appointment, it will not.
Thanks
this is not what i want.
I want to check the current day in Radschedular RecurrenceEditor. I am able to get the day of appointment day. But recurrence editor does not check the current day on Add New Appointment.
If i use Add new Recurring appointment then it will check the current day but in case of Add new appointment, it will not.
Thanks
0
Hi,
You can check or uncheck some of the checkboxes in the recurrence editor in FormCreated event as for example it is described in this Handling FormCreated help topic in the Make changes in the recurrence editor paragraph.
Hope this will be helpful.
Regards,
Plamen
Telerik
You can check or uncheck some of the checkboxes in the recurrence editor in FormCreated event as for example it is described in this Handling FormCreated help topic in the Make changes in the recurrence editor paragraph.
Hope this will be helpful.
Regards,
Plamen
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.