Unplanned
Last Updated: 03 Jul 2024 14:06 by ADMIN
Huib
Created on: 03 Jul 2024 13:54
Category: Calendar
Type: Bug Report
0
RadCalendar: Backward navigation is not working correctly in MultiView mode
In this case, we have a multiview RadCalendar with 1 column and 3 rows. Clicking on the move forward button will move the months with 1. Clicking on the move back will jump more than 1 months.
1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 03 Jul 2024 14:06

Hi Huib,

Thank you for reporting this. As a workaround, you can try the following approach. In a few words, we can subscribe to the Navigating event in which we can create our own MultiMonthView.

private void RadCalendar1_Navigating(object sender, Telerik.WinControls.UI.CalendarNavigatingEventArgs e)
{
    var nextStartdate = new DateTime();

    var currentStartdate = this.radCalendar1.CalendarElement.CalendarVisualElement.View.ViewEndDate;

    if (e.Direction == CalendarNavigationDirection.Forward)
    {
        nextStartdate = currentStartdate.AddMonths(1);
        var montView = new MultiMonthView(this.radCalendar1, nextStartdate);
        montView.ViewStartDate = nextStartdate;
        this.radCalendar1.CalendarElement.CalendarVisualElement.View = montView;
    }

    else if (e.Direction == CalendarNavigationDirection.Backward)
    {
        nextStartdate = currentStartdate.AddMonths(-1);
        var montView = new MultiMonthView(this.radCalendar1, nextStartdate);
        montView.ViewStartDate = nextStartdate;
        this.radCalendar1.CalendarElement.CalendarVisualElement.View = montView;
    }

    e.Cancel = true;
}

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.