Hide and show next and previous arrows in the navigation pane

3 posts, 0 answers
  1. Mona
    Mona avatar
    3 posts
    Member since:
    Nov 2011

    Posted 07 Feb 2012 Link to this post

    I would like to know how to hide and show the next and previous arrows in the navigation pane based on requirements. My requirement is a customer can only look at the scheduler for previous month, current month and next month. So if they are in next month view them i should disable to hide the next month arrow in the navigation pane and if they are in previous month view i should hide or disable the previous month arrow in the navigation pane. I searched around but couldn't find a solution for this problem anywhere.
  2. Plamen
    Admin
    Plamen avatar
    3079 posts

    Posted 10 Feb 2012 Link to this post

    Hello Mona,

     
    You can use the NavigationComplete event and set the appropriate styles to hide the arrows:

    protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
        {
            if (RadScheduler1.SelectedDate.Month == DateTime.Now.Month)
            {
                RadScheduler1.CssClass = "show";
            }
            else if (RadScheduler1.SelectedDate.Month == DateTime.Now.AddMonths(1).Month)
            {
                RadScheduler1.CssClass = "hideNext";
            }
            else if (RadScheduler1.SelectedDate.Month == DateTime.Now.AddMonths(-1).Month)
            {
                RadScheduler1.CssClass = "hidePrev";
            }
        }
    /** Move link to the right */
          .show .rsNextDay,.show .rsPrevDay
          {
              display:inline !important;
              }
           
          .hideNext .rsNextDay
          {
              display: none !important;
          }
          .hidePrev .rsPrevDay
          {
               display: none !important;
              }


    Hope this will help.

    Kind regards,
    Plamen Zdravkov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Mona
    Mona avatar
    3 posts
    Member since:
    Nov 2011

    Posted 10 Feb 2012 Link to this post

    Thanks a lot!! It was very helpful.
Back to Top