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

Kendo UI DateInput TagHelper DateInputTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-dateinput")]
[HtmlTargetElement("dateinput-editor", ParentTag = "form-item")]
[HtmlTargetElement("dateinput-editor", ParentTag = "property-grid-item")]
[RestrictChildren("label", new string[] { "kendo-date-input-messages-settings", "steps" })]
public class DateInputTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor

Inheritance: objectTagHelperTagHelperBaseDateInputTagHelper

Implements: IKendoFormEditorITagHelperITagHelperComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-dateinput name="dateinput" value="DateTime.Today"></kendo-dateinput>

Constructors

Initializes a new instance of the DateInputTagHelper class.

C#
public DateInputTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

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; }

An expression to be evaluated against the current model.

C#
public ModelExpression For { 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; }

IsNested member.

C#
[HtmlAttributeNotBound]
public bool IsNested { get; set; }

Implements: IKendoFormEditor.IsNested

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#
[HtmlAttributeName("label")]
public string LabelValue { get; set; }

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

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

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

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

The name of the JavaScript function that will handle the change event. Fires when the selected date is changed

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the DateInput is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { 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; }

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

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

Specifies the selected date.

C#
public object Value { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

TryAddAsEditor method.

C#
public bool TryAddAsEditor(TagHelperContext context)
Parameters:contextTagHelperContextReturns:

bool

The result.

Implements: IKendoFormEditor.TryAddAsEditor(TagHelperContext)

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)