MonthCalendar DisplayRange

0
0

Hi guys,

  1. Consider the following scenario.
    First try:
    A form with a MonthCalendar on it, with dimensions of 1 column and 3 rows. When the form shows up, the MonthCalendar shows March/April/May and the DisplayRange() method gives 1 Mar 2017 to 31 May 2017. All correct.
    Second try:
    I set the MaxSelectionCount = 7, and select (in code) the week of Today (2 Mar 2017), i.e. the dates from 27 Feb to 5 Mar 2017. When the form opens up, the calendar shows now Feb/Mar/Apr. However, the DisplayRange() method gives the same as before, 1 Mar – 31 May, i.e. it does not include February, which is displayed, and it includes May, which is not displayed. Somehow, the Calendar is shifted one month earlier to accommodate my selection range, which starts in Feb, but the DisplayRange method gives inconsistent results with the actual displayed range.
  2. In general, is there a way to set the display range? There is no SetDisplayRange method, and either setting the Today value or selecting dates is not the same thing. I.e. how can I show a MonthCalendar which will show Aug – Oct 2013 ?

Best,
Alex

 

 

  • You must to post comments
0
0

Hi Alex,

WJ-8078 is fixed and included in the latest release (1.3.38).

Best regards
Frank

  • You must to post comments
0
0

Hi Alex,

It’s a bug, the DisplayRange is updated when clicking on the navigation buttons only. It should be updated when the SelectionRange change causes the MonthCalendar to navigate to a different month too. It’s WJ-8078.

The MonthCalendar will automatically navigate to the first month of the selection range if it’s out of range. Initially it displays the range using the Today property. Changing the range programmatically will simply cause the calendar to navigate back to the range that can show the selection.

It is possible in javascript but it won’t really do much since the widget will go back to the first month of the selected range. Eval(“this.__calendars[0].showMonth(m, y)”). You can change the shown month of any of the calendars in the MonthCalendar, the other will sync automatically.

Best,

Luca

 

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.