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

Defines the fluent API for configuring the Kendo DateRangePicker for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DateRangePickerBuilder : WidgetBuilderBase<DateRangePicker, DateRangePickerBuilder>, IHtmlString

Inheritance: objectWidgetBuilderBase<DateRangePicker, DateRangePickerBuilder>DateRangePickerBuilder

Implements: IHtmlString

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

C#
public DateRangePickerBuilder(DateRangePicker component)
Parameters:componentDateRangePicker

The component.

Methods

Specifies the adaptive rendering of the component.

C#
public DateRangePickerBuilder AdaptiveMode(AdaptiveMode value)
Parameters:valueAdaptiveMode

The value that configures the adaptivemode.

Returns:

DateRangePickerBuilder

Allows customization of the subtitle's text in the adaptive view of the component.

C#
public DateRangePickerBuilder AdaptiveSubtitle(string value)
Parameters:valuestring

The value that configures the adaptivesubtitle.

Returns:

DateRangePickerBuilder

Allows customization of the title's text in the adaptive view of the component.

C#
public DateRangePickerBuilder AdaptiveTitle(string value)
Parameters:valuestring

The value that configures the adaptivetitle.

Returns:

DateRangePickerBuilder

Enables the user to select an end date that is before the start date.

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

The value that configures the allowreverse.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder ARIATemplate(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder ARIATemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the ariatemplate.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder ARIATemplateHandler(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder ARIATemplateId(string value)
Parameters:valuestring

The value that configures the ariatemplate.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder ARIATemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the ariatemplate.

Returns:

DateRangePickerBuilder

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.

C#
public DateRangePickerBuilder AutoAdjust(bool value)
Parameters:valuebool

The value that configures the autoadjust.

Returns:

DateRangePickerBuilder

Specifies whether the calendar popup should close automatically when a range is selected.

C#
public DateRangePickerBuilder AutoClose(bool value)
Parameters:valuebool

The value that configures the autoclose.

Returns:

DateRangePickerBuilder

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.

C#
public DateRangePickerBuilder CalendarButton(bool value)
Parameters:valuebool

The value that configures the calendarbutton.

Returns:

DateRangePickerBuilder

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.

C#
public DateRangePickerBuilder ClearButton(bool value)
Parameters:valuebool

The value that configures the clearbutton.

Returns:

DateRangePickerBuilder

Specifies the culture info used by the widget.

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

The value that configures the culture.

Returns:

DateRangePickerBuilder

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

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

The value that configures the dates.

Returns:

DateRangePickerBuilder

Specifies the navigation depth. The following settings are available for the depth value: "month" - Shows the days of the month. (default value); "year" - Shows the months of the year.; "decade" - Shows the years of the decade. or "century" - Shows the decades from the century..

C#
public DateRangePickerBuilder Depth(string value)
Parameters:valuestring

The value that configures the depth.

Returns:

DateRangePickerBuilder

Specifies the disabled dates in the DateRangePicker widget.

C#
public DateRangePickerBuilder DisableDates(IEnumerable<string> disableDates)
Parameters:disableDatesIEnumerable<string>Returns:

DateRangePickerBuilder

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("DateRangePicker")
.DisableDates(new string[] { "we", "th" })
)

Specifies the disabled dates in the DateRangePicker widget.

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

DateRangePickerBuilder

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

Specifies the disabled dates handler in the DateRangePicker widget using a function.

C#
public DateRangePickerBuilder DisableDates(string handler)
Parameters:handlerstringReturns:

DateRangePickerBuilder

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

Specifies the end field name for model binding.

C#
public DateRangePickerBuilder EndField(string value)
Parameters:valuestring

The value that configures the endfield.

Returns:

DateRangePickerBuilder

Configures the client-side events.

C#
public DateRangePickerBuilder Events(Action<DateRangePickerEventBuilder> configurator)
Parameters:configuratorAction<DateRangePickerEventBuilder>

The client events action.

Returns:

DateRangePickerBuilder

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

Sets a value controlling how the color is applied.

C#
public DateRangePickerBuilder FillMode(FillMode value)
Parameters:valueFillMode

The value that configures the fillmode.

Returns:

DateRangePickerBuilder

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

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

The value that configures the footer.

Returns:

DateRangePickerBuilder

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.

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

The value that configures the format.

Returns:

DateRangePickerBuilder

Defines the "inputmode" attribute of the inner <input /> element. The attribute specifies the type of on-screen keyboard displayed when the user focuses the input.

C#
public DateRangePickerBuilder InputMode(string value)
Parameters:valuestring

The value that configures the "inputmode" attribute.

Returns:

DateRangePickerBuilder

Example:
C#
@(Html.Kendo().DateRangePicker()
.Name("dateRangePicker")
.InputMode("numeric")
)

Determines if the labels for the inputs will be visible.

C#
public DateRangePickerBuilder Labels(bool value)
Parameters:valuebool

The value that configures the labels.

Returns:

DateRangePickerBuilder

Specifies the maximum date, which the calendar can show.

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

The value that configures the max.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder Messages(Action<DateRangePickerMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<DateRangePickerMessagesSettingsBuilder>

The action that configures the messages.

Returns:

DateRangePickerBuilder

Specifies the minimum date that the calendar can show.

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

The value that configures the min.

Returns:

DateRangePickerBuilder

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

C#
public DateRangePickerBuilder Month(Action<MonthTemplateBuilder> configurator)
Parameters:configuratorAction<MonthTemplateBuilder>

The action that configures the month.

Returns:

DateRangePickerBuilder

Configures the Kendo UI DateRangePicker range settings.

C#
public DateRangePickerBuilder Range(Action<DateRangePickerRangeSettingsBuilder> configurator)
Parameters:configuratorAction<DateRangePickerRangeSettingsBuilder>

The action that configures the range.

Returns:

DateRangePickerBuilder

Sets a value controlling the border radius.

C#
public DateRangePickerBuilder Rounded(Rounded value)
Parameters:valueRounded

The value that configures the rounded.

Returns:

DateRangePickerBuilder

Sets the size of the component.

C#
public DateRangePickerBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value that configures the size.

Returns:

DateRangePickerBuilder

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 DateRangePickerBuilder Start(string value)
Parameters:valuestring

The value that configures the start.

Returns:

DateRangePickerBuilder

Specifies the start field name for model binding.

C#
public DateRangePickerBuilder StartField(string value)
Parameters:valuestring

The value that configures the startfield.

Returns:

DateRangePickerBuilder

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.

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

The value that configures the weeknumber.

Returns:

DateRangePickerBuilder