Defines the fluent API for configuring the Kendo UI DateTimePicker
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class DateTimePickerBuilder : MvvmWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>MvvmWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>DateTimePickerBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the DateTimePickerBuilder class.
public DateTimePickerBuilder(DateTimePicker component)
The component.
Methods
Specifies the adaptive rendering of the component.
public DateTimePickerBuilder AdaptiveMode(AdaptiveMode value)
The value for AdaptiveMode
Returns:Returns the current DateTimePickerBuilder instance.
Allows customization of the subtitle's text in the adaptive view of the component.
public DateTimePickerBuilder AdaptiveSubtitle(string value)
The value for AdaptiveSubtitle
Returns:Returns the current DateTimePickerBuilder instance.
Allows customization of the title's text in the adaptive view of the component.
public DateTimePickerBuilder AdaptiveTitle(string value)
The value for AdaptiveTitle
Returns:Returns the current DateTimePickerBuilder instance.
Configures the animation effects of the widget.
public DateTimePickerBuilder Animation(Action<PopupAnimationBuilder> animationAction)
The action which configures the animation effects.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Use to enable or disable animation of the popup element.
public DateTimePickerBuilder Animation(bool enable)
The boolean value.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Specifies a template used to populate 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 DateTimePickerBuilder ARIATemplate(string value)
The value for ARIATemplate
Returns:Returns the current DateTimePickerBuilder instance.
Specifies a template used to populate 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 DateTimePickerBuilder ARIATemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the ariatemplate.
Returns:Returns the current DateTimePickerBuilder instance.
Specifies a template used to populate 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 DateTimePickerBuilder ARIATemplateHandler(string templateHandler)
The handler that returs the template for ARIATemplate
Returns:Returns the current DateTimePickerBuilder instance.
Specifies a template used to populate 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 DateTimePickerBuilder ARIATemplateId(string templateId)
The ID of the template element for ARIATemplate
Returns:Returns the current DateTimePickerBuilder instance.
Specifies a template used to populate 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 DateTimePickerBuilder ARIATemplateView(IHtmlContent templateView)
The view that contains the template for ARIATemplate
Returns:Returns the current DateTimePickerBuilder 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 DateTimePickerBuilder AutoAdjust(bool value)
The value for AutoAdjust
Returns:Returns the current DateTimePickerBuilder 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 DateTimePickerBuilder AutoCorrectParts(bool value)
The value for AutoCorrectParts
Returns:Returns the current DateTimePickerBuilder instance.
Binds the TimeView to a list of DateTime objects.
public DateTimePickerBuilder BindTo(IEnumerable<DateTime> dates)
The dates.
Returns:A reference to the current DateTimePickerBuilder instance, to allow 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 DateTimePickerBuilder ComponentType(string value)
The value for ComponentType
Returns:Returns the current DateTimePickerBuilder instance.
Specifies the culture info used by the component. A valid kendo culture file must be added to the page in order for the example to work. <script src="https://cdn.jsdelivr.net/npm/@progress/kendo-ui@{version}/umd/cultures/kendo.culture.de-DE.min.js"></script>
public DateTimePickerBuilder Culture(string value)
The value for Culture
Returns:Returns the current DateTimePickerBuilder instance.
Specifies if the DateTimePicker will use DateInput for editing value
public DateTimePickerBuilder DateInput()
Returns the current DateTimePickerBuilder instance.
Specifies if the DateTimePicker will use DateInput for editing value
public DateTimePickerBuilder DateInput(bool value)
The value for DateInput
Returns:Returns the current DateTimePickerBuilder instance.
Specifies a list of dates, which will be passed to the month template of the DateView. All dates, which match the date portion of the selected date will be used to re-bind the TimeView.
public DateTimePickerBuilder Dates(params DateTime[] value)
The value for Dates
Returns:Returns the current DateTimePickerBuilder instance.
Specifies the navigation depth.
public DateTimePickerBuilder Depth(CalendarView value)
The value for Depth
Returns:Returns the current DateTimePickerBuilder instance.
Specifies the disabled dates in the DateTimePicker widget.
public DateTimePickerBuilder DisableDates(params DayOfWeek[] days)
A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Specifies the disabled dates in the DateTimePicker widget using a function.
public DateTimePickerBuilder DisableDates(string handler)
The function handler which will determine the disabled dates.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Enables or disables the picker.
public DateTimePickerBuilder Enable(bool value)
The value that enables/disables the component.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
If set, specifies the latest time the TimeView can show.
public DateTimePickerBuilder EndTime(DateTime value)
The value for EndTime
Returns:Returns the current DateTimePickerBuilder instance.
Configures the client-side events.
public DateTimePickerBuilder Events(Action<DateTimePickerEventBuilder> configurator)
The client events action.
Returns:Returns the current DateTimePickerBuilder instance.
Sets a value controlling how the color is applied.
public DateTimePickerBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current DateTimePickerBuilder instance.
Enables/disables footer of the calendar popup.
public DateTimePickerBuilder Footer(bool footer)
The footer that displayed or hidden for the component.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
The template which renders the footer of the calendar. If false, the footer will not be rendered.
public DateTimePickerBuilder Footer(string value)
The value for Footer
Returns:Returns the current DateTimePickerBuilder instance.
FooterId to be used for rendering the footer of the Calendar.
public DateTimePickerBuilder FooterId(string id)
The id that displays the footer for the component.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Specifies the format, which is used to format the value of the DateTimePicker 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 DateTimePickerBuilder Format(string value)
The value for Format
Returns:Returns the current DateTimePickerBuilder 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 DateTimePickerBuilder InputMode(string value)
The value for InputMode
Returns:Returns the current DateTimePickerBuilder instance.
Specifies the interval between values in the popup list. When the componentType is set to modern, the interval is specified as an object of hours, minutes and seconds.
public DateTimePickerBuilder Interval(Action<IntervalSettingsBuilder> action)
The interval settings.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Specifies the interval between values in the popup list. When the componentType is set to classic, the interval is specified in minutes (numeric values). or When the componentType is set to modern, the interval is specified as an object of hours, minutes and seconds..
public DateTimePickerBuilder Interval(double value)
The value for Interval
Returns:Returns the current DateTimePickerBuilder instance.
Adds a label before the datetimepicker. If the datetimepicker 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 DateTimePickerBuilder Label(Action<DateTimePickerLabelSettingsBuilder> configurator)
The DateTimePickerLabelSettingsBuilder for the label setting.
Returns:Returns the current instance of DateTimePickerBuilder .
Adds a label before the datetimepicker. If the datetimepicker 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 DateTimePickerBuilder Label(string label)
The label.
Returns:Returns the current instance of DateTimePickerBuilder .
Specifies the maximum date, which the calendar can show.
public DateTimePickerBuilder Max(DateTime value)
The value for Max
Returns:Returns the current DateTimePickerBuilder instance.
Sets the maximal date, which can be selected in DatePicker.
public DateTimePickerBuilder Max(string date)
The maximum date that can be set for the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Allows localization of the strings that are used in the widget.
public DateTimePickerBuilder Messages(Action<DateTimePickerMessagesSettingsBuilder> configurator)
The DateTimePickerMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of DateTimePickerBuilder .
Specifies the minimum date that the calendar can show.
public DateTimePickerBuilder Min(DateTime value)
The value for Min
Returns:Returns the current DateTimePickerBuilder instance.
Sets the minimal date, which can be selected in DatePicker.
public DateTimePickerBuilder Min(string date)
The minimum date that can be set for the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Configures the content of cells of the Calendar.
public DateTimePickerBuilder MonthTemplate(Action<MonthTemplateBuilder> monthTemplateAction)
The action method that will be used for rendering cells the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Templates for the cells rendered in the "month" view.
public DateTimePickerBuilder MonthTemplate(string content)
The content to be used for rendering the cells for the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Templates for the cells rendered in the "month" view.
public DateTimePickerBuilder MonthTemplate<TModel>(TemplateBuilder<TModel> template)
The content that will be used for rendering cells the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
MonthTemplate function handler to be used for rendering the cells of the Calendar.
public DateTimePickerBuilder MonthTemplateHandler(string templateHandler)
The name of the JavaScript function to be used for rendering the cells for the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
MonthTemplateId to be used for rendering the cells of the Calendar.
public DateTimePickerBuilder MonthTemplateId(string id)
The id to be used for rendering the cells for the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
MonthTemplateId to be used for rendering the cells of the Calendar.
public DateTimePickerBuilder MonthTemplateView(IHtmlContent templateView)
The view to be used for rendering the cells for the Calendar.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Specifies the formats, which are used to parse the value set with value() method or by direct input. If not set the value of the options.format and options.timeFormat will be used. Note that value of the format option is always used. The timeFormat value also will be used if defined.
public DateTimePickerBuilder ParseFormats(params string[] value)
The value for ParseFormats
Returns:Returns the current DateTimePickerBuilder instance.
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
public DateTimePickerBuilder Popup(Action<DateTimePickerPopupSettingsBuilder> configurator)
The DateTimePickerPopupSettingsBuilder for the popup setting.
Returns:Returns the current instance of DateTimePickerBuilder .
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 DateTimePickerBuilder Readonly(bool value)
The value for Readonly
Returns:Returns the current DateTimePickerBuilder instance.
Sets a value controlling the border radius.
public DateTimePickerBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current DateTimePickerBuilder instance.
Sets the size of the component.
public DateTimePickerBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current DateTimePickerBuilder instance.
Represents available types of calendar views.
public DateTimePickerBuilder Start(CalendarView value)
The value for Start
Returns:Returns the current DateTimePickerBuilder instance.
If set, specifies the earliest time the TimeView can show.
public DateTimePickerBuilder StartTime(DateTime value)
The value for StartTime
Returns:Returns the current DateTimePickerBuilder instance.
Specifies the format, which is used to format the values in the time drop-down list.
public DateTimePickerBuilder TimeFormat(string value)
The value for TimeFormat
Returns:Returns the current DateTimePickerBuilder instance.
Specifies the selected value.
public DateTimePickerBuilder Value(DateTime? value)
The value that configures the value.
Returns:A reference to the current DateTimePickerBuilder instance, to allow for method chaining.
Specifies the selected value.
public DateTimePickerBuilder Value(DateTime value)
The value for Value
Returns:Returns the current DateTimePickerBuilder instance.
Sets the value of the picker input
public DateTimePickerBuilder Value(string date)
The value that configures the value.
Returns:A reference to the current DateTimePickerBuilder instance, to allow 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.
public DateTimePickerBuilder WeekNumber()
Returns the current DateTimePickerBuilder instance.
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 DateTimePickerBuilder WeekNumber(bool value)
The value for WeekNumber
Returns:Returns the current DateTimePickerBuilder instance.