DateRangePickerBuilder
Properties
WriteAction - Func
Methods
DisableDates(System.Collections.Generic.IEnumerable)
Parameters
disableDates - System.Collections.Generic.IEnumerable<String>
DisableDates(System.DayOfWeek[])
Specifies the disabled dates in the DateRangePicker widget.
Parameters
days - System.DayOfWeek[]
Example
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.DisableDates(DayofWeek.Saturday, DayOfWeek.Sunday)
)
DisableDates(System.String)
Specifies the disabled dates in the DateRangePicker widget using a function.
Parameters
handler - System.String
Example
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.DisableDates("disableDates")
)
MonthTemplate(System.Action)
Specifies the month template that will be displayed in the popup calendar.
Parameters
configurator - System.Action<DateRangePickerMonthTemplateSettingsBuilder>
The configurator for the monthtemplate setting.
Example
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.MonthTemplate(m => m.Content("#= data.value #"))
)
AllowReverse(System.Boolean)
Enables the user to select an end date that is before the start date.
Parameters
value - System.Boolean
The value for AllowReverse
AllowReverse()
Enables the user to select an end date that is before the start date.
AutoClose(System.Boolean)
Specifies whether the calendar popup should close automatically when a range is selected.
Parameters
value - System.Boolean
The value for AutoClose
ARIATemplate(System.String)
Specifies a template used to populate value of the aria-label attribute of the currently focused cell of the calendar..The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..
Parameters
value - System.String
The value for ARIATemplate
ARIATemplateId(System.String)
Specifies a template used to populate value of the aria-label attribute of the currently focused cell of the calendar..The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..
Parameters
templateId - System.String
The ID of the template element for ARIATemplate
ARIATemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
Specifies a template used to populate value of the aria-label attribute of the currently focused cell of the calendar..The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..
Parameters
templateView - Microsoft.AspNetCore.Html.IHtmlContent
The view that contains the template for ARIATemplate
ARIATemplateHandler(System.String)
Specifies a template used to populate value of the aria-label attribute of the currently focused cell of the calendar..The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..
Parameters
templateHandler - System.String
The handler that returs the template for ARIATemplate
ARIATemplate(Kendo.Mvc.UI.TemplateBuilder)
Specifies a template used to populate value of the aria-label attribute of the currently focused cell of the calendar..The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the ariatemplate.
AutoAdjust(System.Boolean)
If this property is enabled and you have configured min and/or max values, and the user enters a value that falls out of that range, the value will automatically be set to either the minimum or maximum allowed value.
Parameters
value - System.Boolean
The value for AutoAdjust
CalendarButton(System.Boolean)
If this configuration is enabled, a calendar button will appear inside the date inputs. This is similar to the calendar button in the DatePicker component. The calendar popup will be opened only when the button is clicked. Clicking inside the input itself will have no effect.
Parameters
value - System.Boolean
The value for CalendarButton
CalendarButton()
If this configuration is enabled, a calendar button will appear inside the date inputs. This is similar to the calendar button in the DatePicker component. The calendar popup will be opened only when the button is clicked. Clicking inside the input itself will have no effect.
ClearButton(System.Boolean)
If this configuration is enabled, a clear button will appear in the date inputs where a date is selected. Clicking on the clear button will remove the selected date from the input.
Parameters
value - System.Boolean
The value for ClearButton
ClearButton()
If this configuration is enabled, a clear button will appear in the date inputs where a date is selected. Clicking on the clear button will remove the selected date from the input.
Culture(System.String)
Specifies the culture info used by the widget.
Parameters
value - System.String
The value for Culture
Dates(System.DateTime[])
Specifies a list of dates, which will be passed to the month template.
Parameters
value - System.DateTime[]
The value for Dates
EndField(System.String)
Specifies the end field name for model binding.
Parameters
value - System.String
The value for EndField
Footer(System.String)
The template which renders the footer of the calendar. If false, the footer will not be rendered.
Parameters
value - System.String
The value for Footer
Format(System.String)
Specifies the format, which is used to format the value of the DateRangePicker displayed in the input. The format also will be used to parse the input.For more information on date and time formats please refer to Date Formatting.
Parameters
value - System.String
The value for Format
Max(System.DateTime)
Specifies the maximum date, which the calendar can show.
Parameters
value - System.DateTime
The value for Max
Messages(System.Action)
Allows localization of the strings that are used in the widget.
Parameters
configurator - System.Action<DateRangePickerMessagesSettingsBuilder>
The configurator for the messages setting.
Min(System.DateTime)
Specifies the minimum date that the calendar can show.
Parameters
value - System.DateTime
The value for Min
Labels(System.Boolean)
Determines if the labels for the inputs will be visible.
Parameters
value - System.Boolean
The value for Labels
WeekNumber(System.Boolean)
If set to true a week of the year will be shown on the left side of the calendar. It is possible to define a template in order to customize what will be displayed.
Parameters
value - System.Boolean
The value for WeekNumber
WeekNumber()
If set to true a week of the year will be shown on the left side of the calendar. It is possible to define a template in order to customize what will be displayed.
Range(System.Action)
Configures the Kendo UI DateRangePicker range settings.
Parameters
configurator - System.Action<DateRangePickerRangeSettingsBuilder>
The configurator for the range setting.
StartField(System.String)
Specifies the start field name for model binding.
Parameters
value - System.String
The value for StartField
Start(Kendo.Mvc.UI.CalendarView)
Parameters
value - CalendarView
The value for Start
Depth(Kendo.Mvc.UI.CalendarView)
Specifies the navigation depth.
Parameters
value - CalendarView
The value for Depth
Size(Kendo.Mvc.UI.ComponentSize)
Sets the size of the component.
Parameters
value - ComponentSize
The value for Size
Rounded(Kendo.Mvc.UI.Rounded)
Sets a value controlling the border radius.
Parameters
value - Rounded
The value for Rounded
FillMode(Kendo.Mvc.UI.FillMode)
Sets a value controlling how the color is applied.
Parameters
value - FillMode
The value for FillMode
AdaptiveMode(Kendo.Mvc.UI.AdaptiveMode)
Specifies the adaptive rendering of the component.
Parameters
value - AdaptiveMode
The value for AdaptiveMode
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<DateRangePickerEventBuilder>
The client events action.
Example
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.Events(events => events
.Change("onChange")
)
)
UseMvvmInitialization(System.Boolean)
Specifies if the component should be initialized through MVVM on the client.
Parameters
value - System.Boolean
The value.
UseMvvmInitialization()
Specifies if the component should be initialized through MVVM on the client.
ToComponent()
Returns the internal view component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with
Parameters
deferred - System.Boolean
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
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.
Render()
Renders the component in place.
ToHtmlString()
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.