Need help with calendar

2 posts, 0 answers
  1. Anoop
    Anoop avatar
    1 posts
    Member since:
    Jun 2013

    Posted 11 Jun 2013 Link to this post

    I am working on an Ektron webcalendar which is built onTelerik. I am using the selected date property to set the focus to a specific month on my calendar. After this is set the previous or next button on the top left corner will only work for the latest 2 months.
    for ex - If I set the focus to July, then the prev or next button will only allow me to see June and August.
    Any help is greatly appreciated.

    if (focuDate != DateTime.MinValue)
                Telerik.Web.UI.RadScheduler scheduler = (Telerik.Web.UI.RadScheduler)WebCalendar1.Controls[0];
                scheduler.SelectedDate = focuDate;

  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    1968 posts

    Posted 14 Jun 2013 Link to this post


    You can control the RadScheduler behavior when user clicks on the next/previous button using the following approach: in the NavigationCommmand server-side event handler to stop the default functionality and then change the RadScheduler selected date to the desired value.
    //markup code
    <telerik:RadScheduler ID="RadScheduler1" runat="server" OnNavigationCommand="RadScheduler1_NavigationCommand">
    //code behind
    protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
            e.Cancel = true;
            //here goes your custom logic for RadScheduler.SelectedDate

    Boyan Dimitrov
    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 the blog feed now.
Back to Top