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

Definition

Constructors

C#
public DateInput(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerurlGeneratorIUrlGenerator

Properties

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 bool? AutoAdjust { get; set; }

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

C#
public bool? AutoCorrectParts { get; set; }

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.

C#
public string[] AutoSwitchKeys { get; set; }

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

C#
public bool? AutoSwitchParts { get; set; }

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

C#
public bool? EnableMouseWheel { get; set; }

Sets a value controlling how the color is applied.

C#
public FillMode? FillMode { get; set; }

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.

C#
public string Format { get; set; }

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.

C#
public string InputMode { get; set; }

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.

C#
public DateInputLabelSettings Label { get; set; }

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

C#
public DateTime? Max { get; set; }

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

C#
public DateInputMessagesSettings Messages { get; set; }

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

C#
public DateTime? Min { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

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

C#
public DateInputStepsSettings Steps { get; set; }

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

C#
public double? TwoDigitYearMax { get; set; }

Specifies the selected date.

C#
public DateTime? Value { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)