I am trying to return the visible dates from my UltraMonthViewMulti. I have found code to return the displayed month, but I also need the year - this is so I can return appointments only for the displayed months.
Private Sub ultraMonthViewMulti1_VisibleMonthsChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ultraMonthViewMulti1.VisibleMonthsChanged ' Display the new VisibleMonths to the user Dim info As String = String.Empty info += "The VisibleMonthsChanged event has fired. The new VisibleMonths are as follows:" + vbCrLf + vbCrLf Dim visibleMonth As Infragistics.Win.UltraWinSchedule.MonthViewMulti.VisibleMonth For Each visibleMonth In Me.ultraMonthViewMulti1.VisibleMonths ' Get the name of the visible month, append it to the string we will display Dim monthName As String monthName = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames(visibleMonth.Month.MonthNumber - 1) info += monthName + vbCrLf Next ' Display the message box MessageBox.Show(info, "VisibleMonthsChanged", MessageBoxButtons.OK) End Sub
VisibleMonth exposes a Month property (of type Month object) which in turn exposes a Year property )of type Year object), which exposes a YearNumber property.