Scheduler Visual Date Range

2 posts, 0 answers
  1. Richard
    Richard avatar
    1 posts
    Member since:
    Aug 2011

    Posted 11 Sep 2011 Link to this post

    Is there a way to modify the range which is visible on the Scheduler view? Ex. If I select September, it shows October 1-2 also, can I prevent it from showing the dates from any other month other than the one I am currently viewing? If so, what attributes need to be set?

    Thanks!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Sep 2011 Link to this post

    Hello Richard,

    Try the following code snippet to achieve your scenario.
    C#:
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
    {
       if (RadScheduler1.SelectedView == SchedulerViewType.MonthView)
       {
          String month = RadScheduler1.SelectedDate.Month.ToString();
          if (e.TimeSlot.Start.Date.Month.ToString() != month)
           {
              e.TimeSlot.Control.Controls[0].Controls.Clear();
           }
        }
    }

    Thanks,
    Shinu.
Back to Top