New to Telerik UI for ASP.NET Core? Download free 30-day trial

CalendarMonthTemplateSettingsBuilder

Methods

MonthTemplateHandler(System.String)

Sets the template that renders the cells in the 'month' view.

Parameters

templateHandler - System.String

The JavaScript function that will return the content of the cells in the 'month' view.

Example


             @( Html.Kendo().Calendar()
                        .Name("Calendar")
                        .MonthTemplate(x => x.MonthTemplateHandler("monthTemplate"))
            )
            <script>
               function monthTemplate(data) {
                    if(data.value < 10) {
                        return 'exhibition';
                    }
                    return 'party';
                }
            </script>

WeekNumberHandler(System.String)

Sets the template that renders the cells in "week" column.

Parameters

templateHandler - System.String

The JavaScript function that will return the content of the cells in the 'week' column.

Example


             @( Html.Kendo().Calendar()
                        .Name("Calendar")
                        .MonthTemplate(x => x.WeekNumberHandler("weekNumberTemplate"))
            )
            <script>
               function weekNumberTemplate(data) {
                    return `<span>${data.weekNumber }</span>`;
                }
            </script>

EmptyHandler(System.String)

Sets the template that renders the cells in the 'month' view, which are not in the min/max range.

Parameters

templateHandler - System.String

The JavaScript function that will return the content of the cells in the 'month' view.

Example


             @( Html.Kendo().Calendar()
                        .Name("Calendar")
                        .MonthTemplate(x => x.EmptyHandler("emptyTemplate"))
            )
            <script>
               function emptyTemplate(data) {
                    return '-';
                }
            </script>

Empty(System.String)

Parameters

value - System.String

The value for Empty

EmptyId(System.String)

Parameters

value - System.String

The value for EmptyId

Content(System.String)

Parameters

value - System.String

The value for Content

ContentId(System.String)

Parameters

value - System.String

The value for ContentId

WeekNumber(System.String)

Parameters

value - System.String

The value for WeekNumber

WeekNumberId(System.String)

Parameters

value - System.String

The value for WeekNumberId

In this article
Not finding the help you need?