DatePickerBuilder
Defines the fluent API for configuring the Kendo UI DatePicker
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class DatePickerBuilder : MvvmWidgetBuilderBase<DatePicker, DatePickerBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<DatePicker, DatePickerBuilder>MvvmWidgetBuilderBase<DatePicker, DatePickerBuilder>DatePickerBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the DatePickerBuilder class.
Methods
Specifies the adaptive rendering of the component.
public DatePickerBuilder AdaptiveMode(AdaptiveMode value)
The value for AdaptiveMode
Returns:Returns the current DatePickerBuilder instance.
Allows customization of the subtitle's text in the adaptive view of the component.
public DatePickerBuilder AdaptiveSubtitle(string value)
The value for AdaptiveSubtitle
Returns:Returns the current DatePickerBuilder instance.
Allows customization of the title's text in the adaptive view of the component.
public DatePickerBuilder AdaptiveTitle(string value)
The value for AdaptiveTitle
Returns:Returns the current DatePickerBuilder instance.
Configures the animation effects of the widget.
public DatePickerBuilder Animation(Action<PopupAnimationBuilder> animationAction)
The action which configures the animation effects.
Returns:Use to enable or disable animation of the popup element.
public DatePickerBuilder Animation(bool enable)
The boolean value.
Returns:A DatePickerBuilder instance for method chaining.
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 DatePickerBuilder ARIATemplate(string value)
The value for ARIATemplate
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder ARIATemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the ariatemplate.
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder ARIATemplateHandler(string templateHandler)
The handler that returs the template for ARIATemplate
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder ARIATemplateId(string templateId)
The ID of the template element for ARIATemplate
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder ARIATemplateView(IHtmlContent templateView)
The view that contains the template for ARIATemplate
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder AutoAdjust(bool value)
The value for AutoAdjust
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder AutoCorrectParts(bool value)
The value for AutoCorrectParts
Returns:Returns the current DatePickerBuilder instance.
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.
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 DatePickerBuilder AutoFill(bool value)
The value for AutoFill
Returns:Returns the current DatePickerBuilder instance.
Specifies a list of dates, which will be passed to the month template.
public DatePickerBuilder BindTo(List<DateTime> dates)
The dates.
Returns:A DatePickerBuilder instance for method chaining.
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 DatePickerBuilder ComponentType(string value)
The value for ComponentType
Returns:Returns the current DatePickerBuilder instance.
Specifies the culture info used by the widget.
public DatePickerBuilder Culture(string value)
The value for Culture
Returns:Returns the current DatePickerBuilder instance.
Specifies if the DatePicker will use DateInput for editing value
Specifies if the DatePicker will use DateInput for editing value
public DatePickerBuilder DateInput(bool value)
The value for DateInput
Returns:Returns the current DatePickerBuilder instance.
Specifies a list of dates, which will be passed to the month content.
public DatePickerBuilder Dates(params DateTime[] value)
The value for Dates
Returns:Returns the current DatePickerBuilder instance.
Specifies the navigation depth.
public DatePickerBuilder Depth(CalendarView value)
The value for Depth
Returns:Returns the current DatePickerBuilder instance.
Specifies the disabled dates in the DatePicker widget.
public DatePickerBuilder DisableDates(params DayOfWeek[] days)
Configures the disabled dates.
Returns:A DatePickerBuilder instance for method chaining.
Specifies the disabled dates in the DatePicker widget using a function handler.
public DatePickerBuilder DisableDates(string handler)
Configures the disabled dates.
Returns:A DatePickerBuilder instance for method chaining.
Enables or disables the picker.
public DatePickerBuilder Enable(bool value)
A DatePickerBuilder instance for method chaining.
Configures the client-side events.
public DatePickerBuilder Events(Action<DatePickerEventBuilder> configurator)
The client events action.
Returns:Returns the current DatePickerBuilder instance.
Sets a value controlling how the color is applied.
public DatePickerBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current DatePickerBuilder instance.
Enables/disables footer of the calendar popup.
public DatePickerBuilder Footer(bool footer)
If set to false, disables the footer.
Returns:A DatePickerBuilder instance for method chaining.
The template which renders the footer of the calendar. If false, the footer will not be rendered.
public DatePickerBuilder Footer(string value)
The value for Footer
Returns:Returns the current DatePickerBuilder instance.
FooterId to be used for rendering the footer of the Calendar.
public DatePickerBuilder FooterId(string id)
The footer template's id.
Returns:A DatePickerBuilder instance for method chaining.
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 DatePickerBuilder Format(string value)
The value for Format
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder InputMode(string value)
The value for InputMode
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder Label(Action<DatePickerLabelSettingsBuilder> configurator)
The DatePickerLabelSettingsBuilder for the label setting.
Returns:Returns the current instance of DatePickerBuilder .
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 DatePickerBuilder Label(string label)
The label.
Returns:Returns the current instance of DatePickerBuilder .
Specifies the maximum date, which the calendar can show.
public DatePickerBuilder Max(DateTime value)
The value for Max
Returns:Returns the current DatePickerBuilder instance.
Sets the maximal date, which can be selected in DatePicker.
public DatePickerBuilder Max(string date)
The maximal date of the picker.
Returns:A DatePickerBuilder instance for method chaining.
Allows localization of the strings that are used in the widget.
public DatePickerBuilder Messages(Action<DatePickerMessagesSettingsBuilder> configurator)
The DatePickerMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of DatePickerBuilder .
Specifies the minimum date that the calendar can show.
public DatePickerBuilder Min(DateTime value)
The value for Min
Returns:Returns the current DatePickerBuilder instance.
Sets the minimal date, which can be selected in DatePicker.
public DatePickerBuilder Min(string date)
The minimal date of the picker.
Returns:A DatePickerBuilder instance for method chaining.
Configures the content of cells of the Calendar.
public DatePickerBuilder MonthTemplate(Action<MonthTemplateBuilder> monthTemplateAction)
A DatePickerBuilder instance for method chaining.
Templates for the cells rendered in the "month" view.
public DatePickerBuilder MonthTemplate(string content)
The month template's content.
Returns:A DatePickerBuilder instance for method chaining.
Templates for the cells rendered in the "month" view.
public DatePickerBuilder MonthTemplate<TModel>(TemplateBuilder<TModel> template)
The template that will be used for the content of the cell values.
Returns:A DatePickerBuilder instance for method chaining.
MonthTemplateHandler method.
public DatePickerBuilder MonthTemplateHandler(string templateHandler)
MonthTemplateId to be used for rendering the cells of the Calendar.
public DatePickerBuilder MonthTemplateId(string id)
The month template's id.
Returns:A DatePickerBuilder instance for method chaining.
MonthTemplateId to be used for rendering the cells of the Calendar.
public DatePickerBuilder MonthTemplateView(IHtmlContent templateView)
A DatePickerBuilder instance for method chaining.
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 DatePickerBuilder ParseFormats(params string[] value)
The value for ParseFormats
Returns:Returns the current DatePickerBuilder instance.
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public DatePickerBuilder Popup(Action<DatePickerPopupSettingsBuilder> configurator)
The DatePickerPopupSettingsBuilder for the popup setting.
Returns:Returns the current instance of DatePickerBuilder .
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.
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 DatePickerBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current DatePickerBuilder instance.
Sets a value controlling the border radius.
public DatePickerBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current DatePickerBuilder instance.
Sets the size of the component.
public DatePickerBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current DatePickerBuilder instance.
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 DatePickerBuilder Start(CalendarView value)
The value for Start
Returns:Returns the current DatePickerBuilder instance.
Specifies the selected date.
public DatePickerBuilder Value(DateOnly? value)
The value for Value
Returns:A DatePickerBuilder instance for method chaining.
Specifies the selected date.
public DatePickerBuilder Value(DateOnly value)
The value for Value
Returns:A DatePickerBuilder instance for method chaining.
Sets the value of the picker input
public DatePickerBuilder Value(DateTime? date)
The initial value of the picker.
Returns:A DatePickerBuilder instance for method chaining.
Specifies the selected date.
public DatePickerBuilder Value(DateTime value)
The value for Value
Returns:Returns the current DatePickerBuilder instance.
Sets the value of the picker input
public DatePickerBuilder Value(string date)
A DatePickerBuilder instance for method chaining.
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.
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 DatePickerBuilder WeekNumber(bool value)
The value for WeekNumber
Returns:Returns the current DatePickerBuilder instance.