Set Day of Week in Recurrence Dialog

3 posts, 0 answers
  1. Scott
    Scott avatar
    30 posts
    Member since:
    Dec 2015

    Posted 02 Jul Link to this post

    How can I set it up so that when a user selects a day in the Scheduler, then selects to create a recurring appointment, the Edit Recurring Appointment dialog will, when Weekly recurrence type is selected, set the Day of Week to the Day of Week selected in the calendar, NOT the Day of Week in real-time.

    Thank you!

    -Scott

  2. Dess
    Admin
    Dess avatar
    2110 posts

    Posted 04 Jul Link to this post

    Hello Scott, 

    Thank you for writing.  

    You can force the edit dialog for adding a new appointment to be shown by using a custom SchedulerSelectionBehavior. Here is demonstrated a sample code snippet:
    public RadForm1()
    {
        InitializeComponent();
        this.radScheduler1.SelectionBehavior = new CustomSchedulerSelectionBehavior(this.radScheduler1);
    }
     
    public class CustomSchedulerSelectionBehavior : SchedulerSelectionBehavior
    {
        public CustomSchedulerSelectionBehavior(RadScheduler scheduler) : base(scheduler)
        {
        }
         
        public override void SelectCell(SchedulerCellElement cell, bool extendSelection)
        {
            base.SelectCell(cell, extendSelection);
            DateTimeInterval dateTimeInterval = new DateTimeInterval();
            dateTimeInterval.Start = cell.Date ;
            dateTimeInterval.End = cell.Date;
            bool isRecurring = true;
            SchedulerResourceCollection resources = cell != null ? cell.View.GetResources() : null;
            this.Scheduler.AddNewAppointmentWithDialog(dateTimeInterval, isRecurring, resources);
        }
    }

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Scott
    Scott avatar
    30 posts
    Member since:
    Dec 2015

    Posted 06 Jul in reply to Dess Link to this post

    Hi Dess-

    Thank you!

    -Scott
Back to Top