# Implementing Custom Views for Scheduler

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Telerik UI for ASP.NET MVC Scheduler</td>
 </tr>
 <tr>
  <td>Product Version</td>
  <td>Created with version 2024.4.1112</td>
 </tr>
</table>

## Description

How can I create a custom view for the ASP.NET MVC Scheduler component?

## Solution

By design, the Scheduler provides a variety of built-in views. For more information on the default views, refer to the [Scheduler Views documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/scheduling/scheduler/views).

To create a custom Agenda view that shows the events for one month (31 days), follow the steps below.

1. Define the custom view within the [`Views()`](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/schedulerbuilder#viewssystemaction) configuration by specifying its name and title.

   ```Razor HtmlHelper
           @(Html.Kendo().Scheduler<MeetingViewModel>()
               .Name("scheduler")
               .Views(views => {
                   views.DayView();
                   views.WeekView();
                   views.MonthView();
                   views.AgendaView();
                   views.CustomView("CustomAgenda", view => view.Title("Custom Agenda").Selected(true));
               })
               ...// Additional configuration.
           )
   ```

2. Include the following JavaScript logic before the Scheduler declaration that extends the built-in Agenda view by adding 31 days to its default end date. The name of the JavaScript variable must match the type of the custom view in the Scheduler declaration (for example, **CustomAgenda**).

   ```JS
       <script>
           var CustomAgenda = kendo.ui.AgendaView.extend({
               endDate: function () {
                   var date = kendo.ui.AgendaView.fn.endDate.call(this);
                   return kendo.date.addDays(date, 31);
               }
           });
       </script>
   ```

For a runnable example, refer to the [ASP.NET MVC application](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/SchedulerCustomView) in the [UI for ASP.NET MVC Examples repository](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master) on how to implement a custom view for the Scheduler.

## More ASP.NET MVC Scheduler Resources

* [ASP.NET MVC Scheduler Documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/scheduling/scheduler/overview)

* [ASP.NET MVC Scheduler Demos](https://demos.telerik.com/aspnet-mvc/scheduler/index)

* [ASP.NET MVC Scheduler Product Page](https://www.telerik.com/aspnet-mvc/scheduler)

* [Telerik UI for ASP.NET MVC Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-mvc/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET MVC Forums](https://www.telerik.com/forums/aspnet-mvc)

## See Also

* [Client-Side API Reference of the Scheduler for ASP.NET MVC](https://docs.telerik.com/kendo-ui/api/ui/scheduler)

* [Server-Side API Reference of the Scheduler for ASP.NET MVC](https://docs.telerik.com/aspnet-mvc/api/scheduler)

* [Telerik UI for ASP.NET MVC Breaking Changes](https://www.telerik.com/aspnet-mvc/documentation/backwards-compatibility/2024-backwards-compatibility)

* [Telerik UI for ASP.NET MVC Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
