This is a migrated thread and some comments may be shown as answers.

Recurrence Panel Configuration

4 Answers 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Landon
Top achievements
Rank 1
Landon asked on 23 Dec 2010, 06:44 AM
Is there any easy way to disable features within the recurrence panel when creating/updating appointments? For example, I want to use monthly recurrence, but I do NOT want to allow the user to select a monthly interval -- I want the appointment to occur every month. So, I would like to leave everything as-is, but disable/hide the controls that allow the user to select a monthly interval. I'd also like to change the text from "every month(s)" to "every month", since that's all I'll be allowing. I've been working on this all day, and it's really driving me insane now. Surely there's some way to manage this type of configuration without creating completely custom templates, right? PLEASE HELP -- I'M DESPERATE!

Thanks for your help,
Landon

4 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 23 Dec 2010, 12:40 PM
Hello Landon,

To change the text from "every month(s)" to "every month" - please use the following property: Localization-AdvancedMonths="month".
To remove the textbox and spin arrows set this Css class:

.riSpin
        {
            visibility: hidden !important;
        }

and this JQuery code:

function OnClientFormCreated(sender, eventArgs) {
            var $ = $telerik.$;
            $(".rsAdvPatternPanel li").find('div:last').css("display", "none");
        }

Please find the full code in the attached .zip file.

Hope this helps.

All the best,
Veronica Milcheva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Landon
Top achievements
Rank 1
answered on 23 Dec 2010, 05:57 PM
Veronica,

Thank you very much: that was extremely helpful! I now have a better idea about how to do some of the manipulations I need to do.

A couple of things:
  • You don't actually have to include the style to hide the spin buttons, because hiding the div hides those, too.
  • If you hide the spin buttons using the class you indicated, it hides them for ALL recurrence types, not just monthly. But, like I said, since hiding the div does the job, it's not necessary anyway.

Now I have another question for you: for monthly recurrence, I want to limit some of the choices for the "first (...n) day (...n) of every month" option. Specifically, I want to remove "weekday" and "weekend day" from the day list, and leave only "day" and the days of the week. How can I do that?

Thanks again for your help -- I really appreciate it.

Landon
0
Landon
Top achievements
Rank 1
answered on 23 Dec 2010, 09:21 PM
Hello,

Also, I am trying to hide the "Hourly" and "Yearly" recurrence options, and it is NOT working consistently. I have tried both straight jQuery code:

$('ul.rsRecurrenceOptionList li:eq(0)').hide();
$('ul.rsRecurrenceOptionList li:eq(4)').hide();

Which works for the insert form and sporadically for the edit form. I have also tried the RadScheduler's OnClientFormCreated method, which doesn't work at all:

function OnClientFormCreated(sender, eventArgs) {
            var $ = $telerik.$;
            $('ul.rsRecurrenceOptionList li:eq(0)').hide();
            $('ul.rsRecurrenceOptionList li:eq(4)').hide();
}

I am using jQuery on my site...is it a conflict issue? It really seems like it shouldn't be so difficult to hide these options.

Thanks,
Landon
0
Landon
Top achievements
Rank 1
answered on 23 Dec 2010, 10:02 PM
Nevermind about the last issue: I got it fixed, although for some reason I have to specify the advanced edit form ID in the selector, which I don't have to do with the insert form. Strange bug.
Tags
Scheduler
Asked by
Landon
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Landon
Top achievements
Rank 1
Share this question
or