CalendarView contains an advanced navigation system for navigating through dates, months, or years. The control allows navigation in three ways, as follows:
CalendarView consists of navigation buttons, Previous and Next, which allow you to go to the previous or the next month within the maximum and minimum date range.
The following image displays the navigation buttons.
Clicking the month in calendar caption opens the popup month selector. The selector displays nine consecutive months, four before and four after the current month. CalendarView class provides PeriodSelectionType property, which has 'Field' as the default value. In order to display the pop-up year selector in CalendarView, set the PeriodSelectionType property to List.
C# |
Copy Code
|
---|---|
calendarView.PeriodSelectionType = C1.CalendarView.SelectionType.List; |
The following table displays the popup month and year selectors.
Popup Month Selector |
|
Popup Year Selector |
|
The Year field in the CalendarView caption can be shown in the form of field or list. By default, the year in the CalendarView caption is shown in the form of field since the PeriodSelectionType is set to Field value. The year field enables you to input any year value and jump to that specific year right from the current year. However, the input year value should lie in the range of selectable dates.
The following image displays the year field.