Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
50
WebMonthView day navigation in edge days outside of current month
posted

Hello Infragistics,

My application currently uses WebCalendar with the WebMonthView control. The easiest way to explain what's going on is:

Say for instance you're in October.. Your main calendar and the mini monthview calendar will show October as well. In the monthview, if I were to go to November 1st, the month view's title will change to November and the 1st will be highlighted.

The main calendar, however, will remain showing October, but the current highlighted day will move to the grayed area for November, to the 1st. Is there a way to force the main calendar to shift to the next month and day entirely? I've seen this mentioned a few times on the forum, and I couldn't find any solutions with them that helped me.

  • 20255
    Offline posted

    Hello Tom,

     I'm still following your issue. Have you seen the attachment? If you still have any concerns or questions I will be glad to help!

     

  • 20255
    Suggested Answer
    Offline posted

    Hello Tom,

     The behavior of the WebMonthView, is to show the visible days (including that in grayed area for next/previous month).
     If you select invisible date from the WebMonthCalendar (the grayed area from next/previous month days is from the visible part), then the WebMonthView date will change too. About that you suggest, to force the calendar to go to the next month and day entirely, I can suggest you to use this method:

    function WebMonthCalendar1_SelectionChanged(sender, eventArgs) {
                var webScheduleInfo = ig_getWebScheduleInfoById("WebScheduleInfo1")
                webScheduleInfo.setActiveDay(sender.get_selectedDate());
                var webMonthView = ig_getWebMonthViewById("WebMonthView1");

                if (sender.get_selectedDate().getMonth() < webMonthView.getCurrentMonth().getMonth()) {
                    $('.igmv_NavigationButtonPrev').click();
                } else if (sender.get_selectedDate().getMonth() > webMonthView.getCurrentMonth().getMonth()) {
                    $('.igmv_NavigationButtonNext').click();
                }
            }

     I've attached you a sample that represents your requirements. I hope that will be helpful to you. Looking forward to hearing from you!

    DayNavigationInEdgeDaysOutsideOfCurrentMonth.zip
  • 20255
    Offline posted

    Hello Tom,

    I’m currently looking into your issue.
    I’ll let you know what I’ve found out soon.