DateInputBuilder

Properties

WriteAction - Func

Methods

Max(System.Nullable)

Specifies the maximum date which can be entered in the input.

Parameters

value - System.Nullable<DateTime>

The value for Max

RETURNS

A DateInputBuilder instance for method chaining.

Example

Razor
 
            @(Html.Kendo().DateInput()
                .Name("dateinput")
                .Max(new DateTime(2025,3,15))
            )
             

Min(System.Nullable)

Specifies the minimum date that which be entered in the input.

Parameters

value - System.Nullable<DateTime>

The value for Min

RETURNS

A DateInputBuilder instance for method chaining.

Example

Razor
 
            @(Html.Kendo().DateInput()
                .Name("dateinput")
                .Min(new DateTime(2025,3,15))
            )
             

Value(System.Nullable)

Specifies the selected date.

Parameters

value - System.Nullable<DateTime>

The value for the selected date.

RETURNS

A DateInputBuilder instance for method chaining.

Example

Razor
 
            @(Html.Kendo().DateInput()
                .Name("dateinput")
                .Value(new DateTime(2025,3,15))
            )
             

Value(System.DateOnly)

Specifies the selected date.

Parameters

value - System.DateOnly

The value for Value

Value(System.Nullable)

Specifies the selected date.

Parameters

value - System.Nullable<DateOnly>

The value for the selected date.

RETURNS

A DateInputBuilder instance for method chaining.

Example

Razor
 
            @(Html.Kendo().DateInput()
                .Name("dateinput")
                .Value(new DateTime(2025,3,15))
            )
             

Value(System.TimeOnly)

Specifies the selected time.

Parameters

value - System.TimeOnly

The value for Value

Value(System.Nullable)

Specifies the selected date.

Parameters

value - System.Nullable<TimeOnly>

The value for the selected date.

RETURNS

A DateInputBuilder instance for method chaining.

Example

Razor
 
            @(Html.Kendo().DateInput()
                .Name("dateinput")
                .Value(new DateTime(2025,3,15))
            )
             

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

RETURNS

Returns the current DateInputBuilder instance.

AutoCorrectParts(System.Boolean)

Sets a value that indicates whether to automatically correct the segment when out of range

Parameters

value - System.Boolean

The value for AutoCorrectParts

RETURNS

Returns the current DateInputBuilder instance.

AutoSwitchKeys(System.String[])

A string array representing keys that when pressed will force a move to the next segment. By default the culture specific symbols that match / and : are used.

Parameters

value - System.String[]

The value for AutoSwitchKeys

RETURNS

Returns the current DateInputBuilder instance.

AutoSwitchParts(System.Boolean)

A value indicating whether to automatically move to the next segment after a valid value is provided for the current

Parameters

value - System.Boolean

The value for AutoSwitchParts

RETURNS

Returns the current DateInputBuilder instance.

AutoSwitchParts()

A value indicating whether to automatically move to the next segment after a valid value is provided for the current

RETURNS

Returns the current DateInputBuilder instance.

EnableMouseWheel(System.Boolean)

A value indicating whether the mouse scroll can be used to increase/decrease the segments values

Parameters

value - System.Boolean

The value for EnableMouseWheel

RETURNS

Returns the current DateInputBuilder instance.

Format(System.String)

Specifies the format, which is used to format the value of the DateInput displayed in the input. The format also will be used to parse the input.

Parameters

value - System.String

The value for Format

RETURNS

Returns the current DateInputBuilder instance.

InputMode(System.String)

Specifies the inputmode attribute of the inner <input /> element. It is used to specify the type of on-screen keyboard that should be displayed when the user focuses the input.

Parameters

value - System.String

The value for InputMode

RETURNS

Returns the current DateInputBuilder instance.

Label(System.Action)

Adds a label before the dateinput. If the dateinput has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

Parameters

configurator - System.Action<DateInputLabelSettingsBuilder>

The configurator for the label setting.

RETURNS

Returns the current instance of DateInputBuilder .

Max(System.DateTime)

Specifies the maximum date which can be entered in the input.

Parameters

value - System.DateTime

The value for Max

RETURNS

Returns the current DateInputBuilder instance.

Min(System.DateTime)

Specifies the minimum date that which be entered in the input.

Parameters

value - System.DateTime

The value for Min

RETURNS

Returns the current DateInputBuilder instance.

Value(System.DateTime)

Specifies the selected date.

Parameters

value - System.DateTime

The value for Value

RETURNS

Returns the current DateInputBuilder instance.

Messages(System.Action)

The messages that DateInput uses. Use it to customize or localize the placeholders of each date/time part.

Parameters

configurator - System.Action<DateInputMessagesSettingsBuilder>

The configurator for the messages setting.

RETURNS

Returns the current instance of DateInputBuilder .

Steps(System.Action)

An object with the different steps for incrementing/decrementing the various segments

Parameters

configurator - System.Action<DateInputStepsSettingsBuilder>

The configurator for the steps setting.

RETURNS

Returns the current instance of DateInputBuilder .

TwoDigitYearMax(System.Double)

The maximum year value that is considered part of the current century.

Parameters

value - System.Double

The value for TwoDigitYearMax

RETURNS

Returns the current DateInputBuilder instance.

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component.

Parameters

value - ComponentSize

The value for Size

RETURNS

Returns the current DateInputBuilder instance.

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius.

Parameters

value - Rounded

The value for Rounded

RETURNS

Returns the current DateInputBuilder instance.

FillMode(Kendo.Mvc.UI.FillMode)

Sets a value controlling how the color is applied.

Parameters

value - FillMode

The value for FillMode

RETURNS

Returns the current DateInputBuilder instance.

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<DateInputEventBuilder>

The client events action.

RETURNS

Returns the current DateInputBuilder instance.

Example

Razor
 
            @(Html.Kendo().DateInput()
                  .Name("DateInput")
                  .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.

RETURNS

Returns the current instance.

UseMvvmInitialization()

Specifies if the component should be initialized through MVVM on the client.

RETURNS

Returns the current instance.

ToComponent()

Returns the internal view component.

RETURNS

The instance that represents the component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

RETURNS

Returns the current instance.

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

RETURNS

Returns the current instance.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

RETURNS

Returns the current instance.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

RETURNS

Returns a DeferredWidgetBuilder instance.

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

RETURNS

Returns the current instance.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

RETURNS

Returns the current instance.

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.

RETURNS

Returns the current instance.

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.

RETURNS

Returns the current instance.

Render()

Renders the component in place.

ToHtmlString()

Returns the HTML representation of the component.

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

Returns the client template for the component.

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

RETURNS

Returns the current instance.