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

Definition

Namespace:Kendo.Mvc.UI

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DatePicker : DatePickerBase, IScriptableComponent, IPicker, IInputComponent<DateTime>, IWidget, IHtmlAttributesContainer, IFormEditor

Inheritance: objectWidgetBaseDatePickerBaseDatePicker

Implements: IFormEditorIHtmlAttributesContainerIInputComponent<DateTime>IPickerIScriptableComponentIWidget...

Inherited Members DatePickerBase.AnimationDatePickerBase.AutoAdjustDatePickerBase.CultureDatePickerBase.CultureInfoDatePickerBase.DatesDatePickerBase.FormatDatePickerBase.ParseFormatsDatePickerBase.ValueDatePickerBase.MinDatePickerBase.MaxDatePickerBase.EnabledDatePickerBase.DateInputDatePickerBase.PopupSettingsDatePickerBase.ComponentTypeDatePickerBase.SizeDatePickerBase.RoundedDatePickerBase.FillModeDatePickerBase.MessagesDatePickerBase.LabelDatePickerBase.AdaptiveModeDatePickerBase.AdaptiveTitleDatePickerBase.AdaptiveSubtitleDatePickerBase.AutoCorrectPartsWidgetBase.Render()WidgetBase.ToHtmlString()WidgetBase.GetHtml(bool)WidgetBase.GetInitializator()WidgetBase.WriteLicensingScript(TextWriter)WidgetBase.SerializeSettings()WidgetBase.WriteDeferredStyles(TextWriter)WidgetBase.DeferStyles()WidgetBase.ToClientTemplate()WidgetBase.WriteTrialMessage(HtmlTextWriter)WidgetBase.InitializerWidgetBase.EventsWidgetBase.NameWidgetBase.IdWidgetBase.ShouldSanitezeIdWidgetBase.ModelMetadataWidgetBase.HtmlAttributesWidgetBase.ScriptAttributesWidgetBase.ViewContextWidgetBase.ViewDataWidgetBase.IsSelfInitializedWidgetBase.IsInClientTemplateWidgetBase.HasDeferredInitializationWidgetBase.SelectorWidgetBase.HasClientComponentobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public DatePicker(ViewContext viewContext, IJavaScriptInitializer initializer, ViewDataDictionary viewData)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerviewDataViewDataDictionary

Properties

Specifies a template used to populate the value of the aria-label attribute of the currently focused cell of the calendar.

C#
public string ARIATemplate { get; set; }

When enabled, the DatePicker will autofill the rest of the date to the current date when the component looses focus. For example, entering only the date, month or year portion of the date and blurring the component, the missing sections will be automatically completed. Requires a DateInput for editing the value.

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

Specifies the navigation depth. The following settings are available for the depth value: "month" - Shows the days of the month. "year" - Shows the months of the year. "decade" - Shows the years of the decade. "century" - Shows the decades from the century.

C#
public string Depth { get; set; }

Specifies the dates to will be disabled for selection by the widget.

C#
public IEnumerable<string> DisableDates { get; set; }

Specifies the handler for the disabled dates.

C#
public ClientHandlerDescriptor DisableDatesHandler { get; set; }

Enables/Disables the footer of the calendar.

C#
public bool EnableFooter { get; set; }

The template which renders the footer of the calendar.

C#
public string Footer { get; set; }

Specifies the template id which renders the footer of the calendar.

C#
public string FooterId { get; set; }

Defines the "inputmode" attribute of the inner <input /> element. The attribute specifies the type of on-screen keyboard displayed when the user focuses the input.

C#
public string InputMode { get; set; }

Specifies the month template of the widget.

C#
public MonthTemplate MonthTemplate { get; }

If set to true, the widget will be readonly and will not allow user input. The widget is not readonly be default and allow user input.

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

Specifies the start view. The following settings are available for the start value: "month" - Shows the days of the month. "year" - Shows the months of the year. "decade" - Shows the years of the decade. "century" - Shows the decades from the century.

C#
public string Start { get; set; }

Specifies the week of the year that will be shown on the left side of the calendar.

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

Methods

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

IDictionary<string, object>

Overrides: DatePickerBase.Serialize()

Implements: IFormEditor.Serialize()

C#
public override void VerifySettings()

Overrides: WidgetBase.VerifySettings()

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)