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

Defines the fluent API for configuring the Kendo UI MultiViewCalendar

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class MultiViewCalendarBuilder : WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>MultiViewCalendarBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToComponent()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Expression(string)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Name(string)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Deferred(bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.HtmlAttributes(object)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Render()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToHtmlString()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToClientTemplate()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.AsModule(bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ComponentWidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the MultiViewCalendarBuilder class.

C#
public MultiViewCalendarBuilder(MultiViewCalendar component)
Parameters:componentMultiViewCalendar

Methods

Enables the user to select an end date that is before the start date. This option is available only when the selectable configuration is set to range.

C#
public MultiViewCalendarBuilder AllowReverse()
Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Enables the user to select an end date that is before the start date. This option is available only when the selectable configuration is set to range.

C#
public MultiViewCalendarBuilder AllowReverse(bool value)
Parameters:valuebool

The value for AllowReverse

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("range")
.AllowReverse()
)

Defines the century cell format.

C#
public MultiViewCalendarBuilder CenturyCellsFormat(CenturyCellsFormats value)
Parameters:valueCenturyCellsFormats

The value for CenturyCellsFormat

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Start(CalendarView.Century)
.CenturyCellsFormat(CenturyCellsFormats.Short)
)

Specifies the culture info used by the component. A valid kendo culture file must be added to the page in order for the example to work. <script src="https://cdn.jsdelivr.net/npm/@progress/kendo-ui@{version}/umd/cultures/kendo.culture.de-DE.min.js"&gt;&lt;/script>

C#
public MultiViewCalendarBuilder Culture(string value)
Parameters:valuestring

The value for Culture

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Culture("de-DE")
)

Specifies a list of dates, which will be passed to the month template.

C#
public MultiViewCalendarBuilder Dates(params DateTime[] value)
Parameters:valueDateTime[]

The value for Dates

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Dates(new List&lt;DateTime&gt;(){new DateTime(2024,1,4), new DateTime(2024,1,5)})
)

Specifies the navigation depth.

C#
public MultiViewCalendarBuilder Depth(CalendarView value)
Parameters:valueCalendarView

The value for Depth

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Depth(CalendarView.Month)
)

Specifies the disabled dates in the MultiViewCalendar widget using a function.

C#
public MultiViewCalendarBuilder DisableDates(params DayOfWeek[] days)
Parameters:daysDayOfWeek[]

Array of values to disable.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.DisableDates(DayofWeek.Saturday, DayOfWeek.Sunday)
)

Specifies the disabled dates in the MultiViewCalendar widget using a function.

C#
public MultiViewCalendarBuilder DisableDates(string handler)
Parameters:handlerstring

The function which will be called to disable dates..

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.DisableDates("disableDates")
)

Configures the client-side events.

C#
public MultiViewCalendarBuilder Events(Action<MultiViewCalendarEventBuilder> configurator)
Parameters:configuratorAction<MultiViewCalendarEventBuilder>

The client events action.

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Events(events =&gt; events
.Change("onChange")
)
)

Enable/disable footer.

C#
public MultiViewCalendarBuilder Footer(bool footer)
Parameters:footerbool

The value of the property.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Footer(false)
)

The template which renders the footer. If false, the footer will not be rendered.

C#
public MultiViewCalendarBuilder Footer(string value)
Parameters:valuestring

The value for Footer

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Footer(false)
)

FooterId to be used for rendering the footer of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder FooterId(string id)
Parameters:idstring

The value of the footer id.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.FooterId("widgetFooterId")
)

Specifies the format, which is used to parse value set with value() method.

C#
public MultiViewCalendarBuilder Format(string value)
Parameters:valuestring

The value for Format

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Format("dd/MM/yyyy")
.Value(07/06/2024)
)

Specifies the maximum date, which the multiViewCalendar can show.

C#
public MultiViewCalendarBuilder Max(DateTime value)
Parameters:valueDateTime

The value for Max

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Max(new DateTime(2024,12,31))
)

Allows localization of the strings that are used in the widget.

C#
public MultiViewCalendarBuilder Messages(Action<MultiViewCalendarMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<MultiViewCalendarMessagesSettingsBuilder>

The MultiViewCalendarMessagesSettingsBuilder for the messages setting.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder .

Specifies the minimum date, which the multiViewCalendar can show.

C#
public MultiViewCalendarBuilder Min(DateTime value)
Parameters:valueDateTime

The value for Min

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Min(new DateTime(2024,1,1))
)

Configures the content of cells of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder MonthTemplate(Action<MonthTemplateBuilder> monthTemplateAction)
Parameters:monthTemplateActionAction<MonthTemplateBuilder>

The template action reference.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplate(month =&gt; month.Content("#= data.value #"))
)

Templates for the cells rendered in the "month" view.

C#
public MultiViewCalendarBuilder MonthTemplate(string content)
Parameters:contentstring

The content of the template.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplate("#= data.value #")
)

Configures the content of cells of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder MonthTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The template action reference.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplate(Html.Kendo().Template().AddHtml("test"))
)

The handler which will be used to generate the content for the month template.

C#
public MultiViewCalendarBuilder MonthTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The function which will be used for the template content.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplateHandler("handler")
)

MonthTemplateId to be used for rendering the cells of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder MonthTemplateId(string id)
Parameters:idstring

The id referencing the month template instance.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplateId("widgetMonthTemplateId")
)

MonthTemplateView to be used for rendering the cells of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder MonthTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The reference to the template view.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplateView(Html.Partial("widgetMonthTemplate"))
)

Configures the Kendo UI MultiViewCalendar range settings.

C#
public MultiViewCalendarBuilder Range(Action<MultiViewCalendarRangeSettingsBuilder> configurator)
Parameters:configuratorAction<MultiViewCalendarRangeSettingsBuilder>

The MultiViewCalendarRangeSettingsBuilder for the range setting.

Returns:

MultiViewCalendarBuilder

Returns the current instance of MultiViewCalendarBuilder .

By default user is able to select a single date. The property can also be set to "multiple" or "range". More information about multiple selection can be found in the Selection article.

C#
public MultiViewCalendarBuilder Selectable(string value)
Parameters:valuestring

The value for Selectable

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("multiple")
)

Specifies which dates to be selected when the multiViewCalendar is initialized.

C#
public MultiViewCalendarBuilder SelectDates(params DateTime[] value)
Parameters:valueDateTime[]

The value for SelectDates

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("multiple")
.SelectDates(new DateTime[] { new DateTime(2024,7,5), new DateTime(2024,7,10) })
)

When this configuration is enabled, the MultiViewCalendar will render days from the previous and next months in the current views.

C#
public MultiViewCalendarBuilder ShowOtherMonthDays()
Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

When this configuration is enabled, the MultiViewCalendar will render days from the previous and next months in the current views.

C#
public MultiViewCalendarBuilder ShowOtherMonthDays(bool value)
Parameters:valuebool

The value for ShowOtherMonthDays

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.ShowOtherMonthDays()
)

If set to true will render a header for every view.

C#
public MultiViewCalendarBuilder ShowViewHeader()
Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

If set to true will render a header for every view.

C#
public MultiViewCalendarBuilder ShowViewHeader(bool value)
Parameters:valuebool

The value for ShowViewHeader

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.ShowViewHeader()
)

Specifies the start view. The following settings are available for the start value: "month" - Shows the days of the month.; "year" - Shows the months of the year.; "decade" - Shows the years of the decade. or "century" - Shows the decades from the century..

C#
public MultiViewCalendarBuilder Start(CalendarView value)
Parameters:valueCalendarView

The value for Start

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Start(CalendarView.Month)
)

Specifies the selected date.

C#
public MultiViewCalendarBuilder Value(DateTime value)
Parameters:valueDateTime

The value for Value

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Value("2024/07/05")
)

This property controls how many months to be shown at same time. By default it shows two months.

C#
public MultiViewCalendarBuilder Views(double value)
Parameters:valuedouble

The value for Views

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Views(2)
)

If set to true a week of the year will be shown on the left side of the multiViewCalendar.

C#
public MultiViewCalendarBuilder WeekNumber()
Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

If set to true a week of the year will be shown on the left side of the multiViewCalendar.

C#
public MultiViewCalendarBuilder WeekNumber(bool value)
Parameters:valuebool

The value for WeekNumber

Returns:

MultiViewCalendarBuilder

Returns the current MultiViewCalendarBuilder instance.

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.WeekNumber(true)
)