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

Defines the fluent interface for configuring the MultiViewCalendar.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

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

Inheritance: objectWidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>MultiViewCalendarBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToComponent()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Name(string)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Deferred(bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.HtmlAttributes(object)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.AsModule(bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Render()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToHtmlString()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToClientTemplate()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.ToString()WidgetBuilderBase<MultiViewCalendar, MultiViewCalendarBuilder>.Componentobject.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 MultiViewCalendar class.

C#
public MultiViewCalendarBuilder(MultiViewCalendar component)
Parameters:componentMultiViewCalendar

The component.

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

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

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

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

Defines the century cell format.

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

The value for CenturyCellsFormat

Returns:

MultiViewCalendarBuilder

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

Specifies the culture info used by the MultiViewCalendar widget.

C#
public MultiViewCalendarBuilder Culture(string culture)
Parameters:culturestring

The chosen culture.

Returns:

MultiViewCalendarBuilder

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(IList<DateTime> dates)
Parameters:datesIList<DateTime>

The collection of dates to be passed.

Returns:

MultiViewCalendarBuilder

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 depth)
Parameters:depthCalendarView

The chosen calendar depth.

Returns:

MultiViewCalendarBuilder

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

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

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

Configures the client-side events.

C#
public MultiViewCalendarBuilder Events(Action<MultiViewCalendarEventBuilder> clientEventsAction)
Parameters:clientEventsActionAction<MultiViewCalendarEventBuilder>

The client events action.

Returns:

MultiViewCalendarBuilder

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

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)
)

Footer template to be used for rendering the footer of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder Footer(string footer)
Parameters:footerstring

The value of the footer template.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Footer("#= kendo.toString(data, "G") #")
)

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

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

The value of the property.

Returns:

MultiViewCalendarBuilder

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

Sets the date format, which will be used to parse and format the machine date.

C#
public MultiViewCalendarBuilder Format(string format)
Parameters:formatstring

The desired format.

Returns:

MultiViewCalendarBuilder

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

Sets the maximal date, which can be selected in the MultiViewCalendar

C#
public MultiViewCalendarBuilder Max(DateTime date)
Parameters:dateDateTime

The value of the property.

Returns:

MultiViewCalendarBuilder

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

Sets the maximal date, which can be selected in the MultiViewCalendar.

C#
public MultiViewCalendarBuilder Max(string date)
Parameters:datestring

The value of the property.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Max("12/01/2024")
)

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

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

The configurator for the messages setting.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.WeekNumber(true)
.Messages(msg =&gt; msg.NavigateTo("Go to").WeekColumnHeader("Week No."))
)

Sets the minimal date, which can be selected in the MultiViewCalendar

C#
public MultiViewCalendarBuilder Min(DateTime date)
Parameters:dateDateTime

The value of the property.

Returns:

MultiViewCalendarBuilder

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

Sets the minimal date, which can be selected in the MultiViewCalendar.

C#
public MultiViewCalendarBuilder Min(string date)
Parameters:datestring

The value of the property.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Min("01/01/2024")
)

Configures the content of cells of the MultiViewCalendar.

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

The template action reference.

Returns:

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 template content.

Returns:

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>Returns:

MultiViewCalendarBuilder

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

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

C#
public MultiViewCalendarBuilder MonthTemplateHandler(string template)
Parameters:templatestring

The template content.

Returns:

MultiViewCalendarBuilder

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

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

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

The value of the property.

Returns:

MultiViewCalendarBuilder

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

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

C#
public MultiViewCalendarBuilder MonthTemplateView(MvcHtmlString template)
Parameters:templateMvcHtmlString

The template view instance.

Returns:

MultiViewCalendarBuilder

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

Specifies an initial range selection. This option is available only when the Selectable() configuration is set to "range".

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

The configurator for the range settings.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("range")
.Range(range =&gt; range.Start(new DateTime(2024, 3, 3)).End(new DateTime(2024, 3, 10)))
)

Specifies the selection mode.

C#
public MultiViewCalendarBuilder Selectable(string selectable)
Parameters:selectablestring

The value of the property.

Returns:

MultiViewCalendarBuilder

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

Specifies which dates to be selected if multiple selection mode is enabled.

C#
public MultiViewCalendarBuilder SelectDates(IList<DateTime> selectDates)
Parameters:selectDatesIList<DateTime>

Collection of dates to be selected.

Returns:

MultiViewCalendarBuilder

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

Configures the selection settings of the MultiViewCalendar.

C#
public MultiViewCalendarBuilder Selection(Action<MultiViewCalendarSelectionSettingsBuilder> selectionAction)
Parameters:selectionActionAction<MultiViewCalendarSelectionSettingsBuilder>

SelectAction settings, which includes Action name and IEnumerable of DateTime objects.

Returns:

MultiViewCalendarBuilder

Example:
C#
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selection(s =&gt; s.Action("Save", "Home", new { id = "123" }).Dates(new List&lt;DateTime&gt;(){new DateTime(2024,1,4), new DateTime(2024,1,5)}))
)

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

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

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

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

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

C#
public MultiViewCalendarBuilder ShowViewHeader()
Returns:

MultiViewCalendarBuilder

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

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

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

Specifies the start view.

C#
public MultiViewCalendarBuilder Start(CalendarView start)
Parameters:startCalendarView

The value for the start view.

Returns:

MultiViewCalendarBuilder

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

Sets the value of the MultiViewCalendar

C#
public MultiViewCalendarBuilder Value(DateTime? date)
Parameters:dateDateTime?

The value of the property.

Returns:

MultiViewCalendarBuilder

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

Sets the value of the MultiViewCalendar

C#
public MultiViewCalendarBuilder Value(string date)
Parameters:datestring

The value of the property.

Returns:

MultiViewCalendarBuilder

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

Sets the number of views in the MultiViewCalendar.

C#
public MultiViewCalendarBuilder Views(int views)
Parameters:viewsint

The desired count of views.

Returns:

MultiViewCalendarBuilder

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(bool weekNumber)
Parameters:weekNumberbool

The value of the property.

Returns:

MultiViewCalendarBuilder

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