MultiViewCalendarBuilder
Methods
Culture(System.String)
Specifies the culture info used by the MultiViewCalendar widget.
Parameters
culture - System.String
The chosen culture.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Culture("de-DE")
)
Events(System.Action)
Configures the client-side events.
Parameters
clientEventsAction - System.Action<MultiViewCalendarEventBuilder>
The client events action.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Events(events =>
events.Select("onSelect")
)
)
Format(System.String)
Sets the date format, which will be used to parse and format the machine date.
Parameters
format - System.String
The desired format.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Format("dd/MM/yyyy")
.Value(07/06/2024)
)
FooterId(System.String)
FooterId to be used for rendering the footer of the MultiViewCalendar.
Parameters
id - System.String
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.FooterId("widgetFooterId")
)
Footer(System.String)
Footer template to be used for rendering the footer of the MultiViewCalendar.
Parameters
footer - System.String
The value of the footer template.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Footer("#= kendo.toString(data, "G") #")
)
Footer(System.Boolean)
Enable/disable footer.
Parameters
footer - System.Boolean
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Footer(false)
)
Depth(Kendo.Mvc.UI.CalendarView)
Specifies the navigation depth.
Parameters
depth - CalendarView
The chosen calendar depth.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Depth(CalendarView.Month)
)
Start(Kendo.Mvc.UI.CalendarView)
Specifies the start view.
Parameters
start - CalendarView
The value for the start view.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Start(CalendarView.Month)
)
Selectable(System.String)
Specifies the selection mode.
Parameters
selectable - System.String
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("multiple")
)
SelectDates(System.Collections.Generic.IList)
Specifies which dates to be selected if multiple selection mode is enabled.
Parameters
selectDates - System.Collections.Generic.IList<DateTime>
Collection of dates to be selected.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("multiple")
.SelectDates(new DateTime[] { new DateTime(2024,7,5), new DateTime(2024,7,10) })
)
ShowViewHeader(System.Boolean)
If set to true will render a header for every view.
Parameters
value - System.Boolean
The value for ShowViewHeader
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.ShowViewHeader(false)
)
ShowViewHeader()
If set to true will render a header for every view.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.ShowViewHeader(false)
)
MonthTemplateId(System.String)
MonthTemplateId to be used for rendering the cells of the MultiViewCalendar.
Parameters
id - System.String
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplateId("widgetMonthTemplateId")
)
MonthTemplateView(System.Web.Mvc.MvcHtmlString)
MonthTemplate to be used for rendering the cells of the MultiViewCalendar.
Parameters
template - System.Web.Mvc.MvcHtmlString
The template view instance.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplateView(Html.Partial("widgetMonthTemplate"))
)
MonthTemplateHandler(System.String)
MonthTemplateHandler to be used for rendering the cells of the MultiViewCalendar.
Parameters
template - System.String
The template content.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplateHandler("template")
)
MonthTemplate(System.String)
Templates for the cells rendered in the "month" view.
Parameters
content - System.String
The template content.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplate("#= data.value #")
)
MonthTemplate(System.Action)
Configures the content of cells of the MultiViewCalendar.
Parameters
monthTemplateAction - System.Action<MonthTemplateBuilder>
The template action reference.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.MonthTemplate(month => month.Content("#= data.value #"))
)
Messages(System.Action)
Allows localization of the strings that are used in the widget.
Parameters
configurator - System.Action<MultiViewCalendarMessagesSettingsBuilder>
The configurator for the messages setting.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.WeekNumber(true)
.Messages(msg => msg.NavigateTo("Go to").WeekColumnHeader("Week No."))
)
Range(System.Action)
Specifies an initial range selection. This option is available only when the Selectable() configuration is set to "range".
Parameters
configurator - System.Action<MultiViewCalendarRangeSettingsBuilder>
The configurator for the range settings.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("range")
.Range(range => range.Start(new DateTime(2024, 3, 3)).End(new DateTime(2024, 3, 10)))
)
Min(System.String)
Sets the minimal date, which can be selected in the MultiViewCalendar.
Parameters
date - System.String
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Min("01/01/2024")
)
Max(System.String)
Sets the maximal date, which can be selected in the MultiViewCalendar.
Parameters
date - System.String
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Max("12/01/2024")
)
Min(System.DateTime)
Sets the minimal date, which can be selected in the MultiViewCalendar
Parameters
date - System.DateTime
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Min(new DateTime(2024,1,1))
)
Max(System.DateTime)
Sets the maximal date, which can be selected in the MultiViewCalendar
Parameters
date - System.DateTime
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Max(new DateTime(2024,12,31))
)
Views(System.Int32)
Sets the number of views in the MultiViewCalendar.
Parameters
views - System.Int32
The desired count of views.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Views(2)
)
WeekNumber(System.Boolean)
If set to true a week of the year will be shown on the left side of the MultiViewCalendar.
Parameters
weekNumber - System.Boolean
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.WeekNumber(true)
)
Value(System.Nullable)
Sets the value of the MultiViewCalendar
Parameters
date - System.Nullable<DateTime>
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Value(new DateTime(2024,07,05))
)
Value(System.String)
Sets the value of the MultiViewCalendar
Parameters
date - System.String
The value of the property.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Value("2024/07/05")
)
Selection(System.Action)
Configures the selection settings of the MultiViewCalendar.
Parameters
selectionAction - System.Action<MultiViewCalendarSelectionSettingsBuilder>
SelectAction settings, which includes Action name and IEnumerable of DateTime objects.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selection(s => s.Action("Save", "Home", new { id = "123" }).Dates(new List<DateTime>(){new DateTime(2024,1,4), new DateTime(2024,1,5)}))
)
Dates(System.Collections.Generic.IList)
Specifies a list of dates, which will be passed to the month template.
Parameters
dates - System.Collections.Generic.IList<DateTime>
The collection of dates to be passed.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Dates(new List<DateTime>(){new DateTime(2024,1,4), new DateTime(2024,1,5)})
)
DisableDates(System.Collections.Generic.IEnumerable)
Specifies the disabled dates in the MultiViewCalendar component.
Parameters
disableDates - System.Collections.Generic.IEnumerable<String>
The array of dates that must be disabled.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.DisableDates(new string[]{ "we", "th" })
)
DisableDates(System.DayOfWeek[])
Specifies the disabled dates in the MultiViewCalendar widget using a function.
Parameters
days - System.DayOfWeek[]
Array of values to disable.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.DisableDates(DayofWeek.Saturday, DayOfWeek.Sunday)
)
DisableDates(System.String)
Specifies the disabled dates in the MultiViewCalendar widget using a function.
Parameters
handler - System.String
The function which will be called to disable dates.
Example
@( Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.DisableDates("disableDates")
)
ShowOtherMonthDays(System.Boolean)
When this configuration is enabled, the MultiViewCalendar will render days from the previous and next months in the current views.
Parameters
value - System.Boolean
The value for ShowOtherMonthDays
Example
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.ShowOtherMonthDays(false)
)
ShowOtherMonthDays()
When this configuration is enabled, the MultiViewCalendar will render days from the previous and next months in the current views.
Example
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.ShowOtherMonthDays(false)
)
CenturyCellsFormat(Kendo.Mvc.UI.CenturyCellsFormats)
Defines the century cell format.
Parameters
value - CenturyCellsFormats
The value for CenturyCellsFormat
Example
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Start(CalendarView.Century)
.CenturyCellsFormat(CenturyCellsFormats.Short)
)
AllowReverse(System.Boolean)
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.
Parameters
value - System.Boolean
The value for AllowReverse
Example
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("range")
.AllowReverse(true)
)
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.
Example
@(Html.Kendo().MultiViewCalendar()
.Name("MultiViewCalendar")
.Selectable("range")
.AllowReverse(true)
)
ToComponent()
Returns the internal view component.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name of the component.
Example
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
ModelMetadata(System.Web.Mvc.ModelMetadata)
Uses the Metadata of the Model.
Parameters
modelMetadata - System.Web.Mvc.ModelMetadata
The metadata set for the Model
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
Render()
Renders the component.
Example
@(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
@( Html.Kendo().Grid(Model)
.Name("grid")
.DetailTemplate(product => {
)
Product Details:
<div>Product Name: @( product.ProductName )</div>
<div>Units In Stock: @( product.UnitsInStock )</div>
@(
})
.Render();
)
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.