Blazor | ComponentOne
Controls / Calendar / Views
In This Topic
    Views
    In This Topic

    Calendar supports three different views, namely month, year and decade view. By default, the calendar displays month view showing month/year format. The calendar control allows you to navigate between the views using the Expand/Collapse button available in the calendar header as shown in the GIF below:

    Calendar control showing different views

    You can also change the view of the calendar programmatically using ViewMode property of the C1Calendar class. The ViewMode property accesses the CalendarViewMode enumeration to change the calendar view.

    Calendar control showing different views

    The following code demonstrates how to set the year view for the calendar.

    Razor
    Copy Code
    <C1Calendar ViewMode="@CalendarViewMode.Year"></C1Calendar>