DatePicker
Kendo UI DatePicker component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class DatePicker : WidgetBase, IHtmlAttributesContainer, IFormEditor
Inheritance: objectWidgetBaseDatePicker
Implements:
Inherited Members
Constructors
Initializes a new instance of the DatePicker class.
Properties
Specifies the adaptive rendering of the component.
public AdaptiveMode? AdaptiveMode { get; set; }
Allows customization of the subtitle's text in the adaptive view of the component.
public string AdaptiveSubtitle { get; set; }
Allows customization of the title's text in the adaptive view of the component.
public string AdaptiveTitle { get; set; }
Configures the opening and closing animations of the calendar popup.
public PopupAnimation Animation { get; }
Specifies a template used to populate the value of the aria-label attribute of the currently focused cell of the calendar. The parameters available for the template are: current - The current focused date.; valueType - The focused item value type - month, year and etc. or text - A text representing the focused value..
public string ARIATemplate { get; set; }
The handler that returns the template used for ARIATemplate
public string ARIATemplateHandler { get; set; }
The id of the script element used for ARIATemplate
public string ARIATemplateId { get; set; }
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. This property has effect only when the dateInput of the component is enabled.
public bool? AutoAdjust { get; set; }
Sets a value that indicates whether to automatically correct the segment when out of range. In order to work, dateInput prop should be set to true.
public bool? AutoCorrectParts { get; set; }
When enabled, the DatePicker will autofill the rest of the date to the current date when the component loses 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.
public bool? AutoFill { get; set; }
Specifies the component type of the widget. "classic" - Uses the standard rendering of the widget. or "modern" - Uses new rendering with a fresh and modern look and feel..
public string ComponentType { get; set; }
Specifies the culture info used by the widget.
public CultureInfo CultureInfo { get; }
Specifies if the DatePicker will use DateInput for editing value
public bool? DateInput { get; set; }
Specifies a list of dates, which will be passed to the month content.
public DateTime[] Dates { get; set; }
Specifies the navigation depth.
public CalendarView? Depth { get; set; }
The dates that will be disabled for selection by the widget.
public IEnumerable<string> DisableDates { get; set; }
Specifies the handler for the disabled dates.
public ClientHandlerDescriptor DisableDatesHandler { get; set; }
Enables/Disables Footer
public bool EnableFooter { get; set; }
Sets a value controlling how the color is applied.
public FillMode? FillMode { get; set; }
The template which renders the footer of the calendar. If false, the footer will not be rendered.
public string Footer { get; set; }
The template id which renders the footer of the calendar.
public string FooterId { get; set; }
Specifies the format, which is used to format the value of the DatePicker displayed in the input. The format also will be used to parse the input.For more information on date and time formats please refer to Date Formatting.
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; }
Adds a label before the datepicker. If the datepicker has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.
public DatePickerLabelSettings Label { get; }
Specifies the maximum date, which the calendar can show.
public DateTime? Max { get; set; }
Allows localization of the strings that are used in the widget.
public DatePickerMessagesSettings Messages { get; }
Specifies the minimum date that the calendar can show.
public DateTime? Min { get; set; }
Specifies the month template for the component.
public MonthTemplate MonthTemplate { get; }
Specifies a list of date formats used to parse the value set with value() method or by direct user input. If not set the value of the format will be used. Note that the format option is always used during parsing.
public string[] ParseFormats { get; set; }
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public DatePickerPopupSettings Popup { 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.
public bool? Readonly { get; set; }
Sets the size of the component.
public ComponentSize? Size { 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. or "century" - Shows the decades from the century..
public CalendarView? Start { get; set; }
If set to true a week of the year will be shown on the left side of the calendar. It is possible to define a template in order to customize what will be displayed.
public bool? WeekNumber { get; set; }
Methods
GetElement method.
ProcessSettings method.
public override void ProcessSettings()
Overrides:
Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
Implements:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
VerifySettings method.
public override void VerifySettings()
Overrides:
Writes the HTML content.
protected override void WriteHtml(TextWriter writer)
The text writer.
Overrides:
WriteInitializationScript method.
public override void WriteInitializationScript(TextWriter writer)
Overrides: