DateInputTagHelper
Kendo UI DateInput TagHelper DateInputTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[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:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-dateinput name="dateinput" value="DateTime.Today"></kendo-dateinput>
Child Tags
Constructors
Initializes a new instance of the DateInputTagHelper class.
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.
public bool? AutoAdjust { get; set; }
Sets a value that indicates whether to automatically correct the segment when out of range
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.
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
public bool? AutoSwitchParts { get; set; }
A value indicating whether the mouse scroll can be used to increase/decrease the segments values
public bool? EnableMouseWheel { get; set; }
Sets a value controlling how the color is applied.
public FillMode? FillMode { get; set; }
An expression to be evaluated against the current model.
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.
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.
public string InputMode { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
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.
[HtmlAttributeName("label")]
public string LabelValue { get; set; }
Specifies the maximum date which can be entered in the input.
public DateTime? Max { get; set; }
Specifies the minimum date that which be entered in the input.
public DateTime? Min { get; set; }
The name of the JavaScript function that will handle the change event. Fires when the selected date is changed
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.
public string OnKendoKeydown { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
The maximum year value that is considered part of the current century.
public double? TwoDigitYearMax { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
TryAddAsEditor method.
public bool TryAddAsEditor(TagHelperContext context)
The result.
Implements:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: