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
Example
@(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
Example
@(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.
Example
@(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.
Example
@(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.
Example
@(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
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
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
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
AutoSwitchParts()
A value indicating whether to automatically move to the next segment after a valid value is provided for the current
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
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
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.
Max(System.DateTime)
Specifies the maximum date which can be entered in the input.
Parameters
value - System.DateTime
The value for Max
Min(System.DateTime)
Specifies the minimum date that which be entered in the input.
Parameters
value - System.DateTime
The value for Min
Value(System.DateTime)
Specifies the selected date.
Parameters
value - System.DateTime
The value for Value
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.
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.
TwoDigitYearMax(System.Double)
The maximum year value that is considered part of the current century.
Parameters
value - System.Double
The value for TwoDigitYearMax
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
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<DateInputEventBuilder>
The client events action.
Example
@(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.
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.