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

Defines the fluent API for configuring the Kendo UI DateTimePicker

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DateTimePickerBuilder : MvvmWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>MvvmWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>DateTimePickerBuilder

Implements: IHtmlContent

Inherited Members MvvmWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.UseMvvmInitialization(bool)MvvmWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.UseMvvmInitialization()WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ToComponent()WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.Expression(string)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.Name(string)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.Deferred(bool)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.HtmlAttributes(object)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.Render()WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ToHtmlString()WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ToClientTemplate()WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.AsModule(bool)WidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ComponentWidgetBuilderBase<DateTimePicker, DateTimePickerBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the DateTimePickerBuilder class.

C#
public DateTimePickerBuilder(DateTimePicker component)
Parameters:componentDateTimePicker

The component.

Methods

Specifies the adaptive rendering of the component.

C#
public DateTimePickerBuilder AdaptiveMode(AdaptiveMode value)
Parameters:valueAdaptiveMode

The value for AdaptiveMode

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Allows customization of the subtitle's text in the adaptive view of the component.

C#
public DateTimePickerBuilder AdaptiveSubtitle(string value)
Parameters:valuestring

The value for AdaptiveSubtitle

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Allows customization of the title's text in the adaptive view of the component.

C#
public DateTimePickerBuilder AdaptiveTitle(string value)
Parameters:valuestring

The value for AdaptiveTitle

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Configures the animation effects of the widget.

C#
public DateTimePickerBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action which configures the animation effects.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("DatePicker")
.Animation(animation =&gt;
{
animation.Open(open =&gt;
{
open.SlideIn(SlideDirection.Down);
})
})
)

Use to enable or disable animation of the popup element.

C#
public DateTimePickerBuilder Animation(bool enable)
Parameters:enablebool

The boolean value.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("DatePicker")
.Animation(false) //toggle effect
)

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..

C#
public DateTimePickerBuilder ARIATemplate(string value)
Parameters:valuestring

The value for ARIATemplate

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.ARIATemplate("Date: #=kendo.toString(data.current, 'd')#")
)

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..

C#
public DateTimePickerBuilder ARIATemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the ariatemplate.

Returns:

DateTimePickerBuilder

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..

C#
public DateTimePickerBuilder ARIATemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for ARIATemplate

Returns:

DateTimePickerBuilder

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..

C#
public DateTimePickerBuilder ARIATemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for ARIATemplate

Returns:

DateTimePickerBuilder

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..

C#
public DateTimePickerBuilder ARIATemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for ARIATemplate

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder AutoAdjust(bool value)
Parameters:valuebool

The value for AutoAdjust

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder AutoCorrectParts(bool value)
Parameters:valuebool

The value for AutoCorrectParts

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Binds the TimeView to a list of DateTime objects.

C#
public DateTimePickerBuilder BindTo(IEnumerable<DateTime> dates)
Parameters:datesIEnumerable<DateTime>

The dates.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.BindTo(new List&lt;DateTime&gt; { DateTime.Now })
)

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..

C#
public DateTimePickerBuilder ComponentType(string value)
Parameters:valuestring

The value for ComponentType

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.ComponentType("classic")
)

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"&gt;&lt;/script>

C#
public DateTimePickerBuilder Culture(string value)
Parameters:valuestring

The value for Culture

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Specifies if the DateTimePicker will use DateInput for editing value

C#
public DateTimePickerBuilder DateInput()
Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Specifies if the DateTimePicker will use DateInput for editing value

C#
public DateTimePickerBuilder DateInput(bool value)
Parameters:valuebool

The value for DateInput

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder Dates(params DateTime[] value)
Parameters:valueDateTime[]

The value for Dates

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Specifies the navigation depth.

C#
public DateTimePickerBuilder Depth(CalendarView value)
Parameters:valueCalendarView

The value for Depth

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Depth(CalendarView.Month)
)

Specifies the disabled dates in the DateTimePicker widget.

C#
public DateTimePickerBuilder DisableDates(params DayOfWeek[] days)
Parameters:daysDayOfWeek[]Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.DisableDates(DayofWeek.Saturday, DayOfWeek.Sunday)
)

Specifies the disabled dates in the DateTimePicker widget using a function.

C#
public DateTimePickerBuilder DisableDates(string handler)
Parameters:handlerstring

The function handler which will determine the disabled dates.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.DisableDates("disableDates")
)

Enables or disables the picker.

C#
public DateTimePickerBuilder Enable(bool value)
Parameters:valuebool

The value that enables/disables the component.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Enable(true)
)

If set, specifies the latest time the TimeView can show.

C#
public DateTimePickerBuilder EndTime(DateTime value)
Parameters:valueDateTime

The value for EndTime

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.EndTime(new DateTime(2023,3,3,8,30,00))
)

Configures the client-side events.

C#
public DateTimePickerBuilder Events(Action<DateTimePickerEventBuilder> configurator)
Parameters:configuratorAction<DateTimePickerEventBuilder>

The client events action.

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Events(events =&gt; events
.Change("onChange")
)
)

Sets a value controlling how the color is applied.

C#
public DateTimePickerBuilder FillMode(FillMode value)
Parameters:valueFillMode

The value for FillMode

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.FillMode(FillMode.Outline)
)

Enables/disables footer of the calendar popup.

C#
public DateTimePickerBuilder Footer(bool footer)
Parameters:footerbool

The footer that displayed or hidden for the component.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Footer(false)
)

The template which renders the footer of the calendar. If false, the footer will not be rendered.

C#
public DateTimePickerBuilder Footer(string value)
Parameters:valuestring

The value for Footer

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Footer("#= kendo.toString(data, "G") #")
)

FooterId to be used for rendering the footer of the Calendar.

C#
public DateTimePickerBuilder FooterId(string id)
Parameters:idstring

The id that displays the footer for the component.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.FooterId("widgetFooterId")
)

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.

C#
public DateTimePickerBuilder Format(string value)
Parameters:valuestring

The value for Format

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder InputMode(string value)
Parameters:valuestring

The value for InputMode

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dtp")
.InputMode("numeric")
)

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.

C#
public DateTimePickerBuilder Interval(Action<IntervalSettingsBuilder> action)
Parameters:actionAction<IntervalSettingsBuilder>

The interval settings.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.ComponentType("modern")
.Interval(interval =&gt; interval
.Hour(3);
.Minute(20);
.Second(15);
)
)

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..

C#
public DateTimePickerBuilder Interval(double value)
Parameters:valuedouble

The value for Interval

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.ComponentType("modern")
.Interval(interval =&gt; interval
.Hour(3);
.Minute(20);
.Second(15);
)
)

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.

C#
public DateTimePickerBuilder Label(Action<DateTimePickerLabelSettingsBuilder> configurator)
Parameters:configuratorAction<DateTimePickerLabelSettingsBuilder>

The DateTimePickerLabelSettingsBuilder for the label setting.

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder Label(string label)
Parameters:labelstring

The label.

Returns:

DateTimePickerBuilder

Returns the current instance of DateTimePickerBuilder .

Specifies the maximum date, which the calendar can show.

C#
public DateTimePickerBuilder Max(DateTime value)
Parameters:valueDateTime

The value for Max

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Max(DateTime.Today)
)

Sets the maximal date, which can be selected in DatePicker.

C#
public DateTimePickerBuilder Max(string date)
Parameters:datestring

The maximum date that can be set for the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Max(DateTime.Today)
)

Allows localization of the strings that are used in the widget.

C#
public DateTimePickerBuilder Messages(Action<DateTimePickerMessagesSettingsBuilder> configurator)
Parameters:configuratorAction<DateTimePickerMessagesSettingsBuilder>

The DateTimePickerMessagesSettingsBuilder for the messages setting.

Returns:

DateTimePickerBuilder

Returns the current instance of DateTimePickerBuilder .

Specifies the minimum date that the calendar can show.

C#
public DateTimePickerBuilder Min(DateTime value)
Parameters:valueDateTime

The value for Min

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Min(DateTime.Today)
)

Sets the minimal date, which can be selected in DatePicker.

C#
public DateTimePickerBuilder Min(string date)
Parameters:datestring

The minimum date that can be set for the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Min(DateTime.Today)
)

Configures the content of cells of the Calendar.

C#
public DateTimePickerBuilder MonthTemplate(Action<MonthTemplateBuilder> monthTemplateAction)
Parameters:monthTemplateActionAction<MonthTemplateBuilder>

The action method that will be used for rendering cells the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.MonthTemplate(month =&gt; month.Content("#= data.value #"))
)

Templates for the cells rendered in the "month" view.

C#
public DateTimePickerBuilder MonthTemplate(string content)
Parameters:contentstring

The content to be used for rendering the cells for the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.MonthTemplate("#= data.value #")
)

Templates for the cells rendered in the "month" view.

C#
public DateTimePickerBuilder MonthTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

The content that will be used for rendering cells the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.MonthTemplate(Html.Kendo().Template()
.AddHtml("&lt;div&gt;${data.value} &lt;/div&gt;")
)
)

MonthTemplate function handler to be used for rendering the cells of the Calendar.

C#
public DateTimePickerBuilder MonthTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The name of the JavaScript function to be used for rendering the cells for the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.MonthTemplateHandler("handler")
)

MonthTemplateId to be used for rendering the cells of the Calendar.

C#
public DateTimePickerBuilder MonthTemplateId(string id)
Parameters:idstring

The id to be used for rendering the cells for the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.MonthTemplateId("widgetMonthTemplateId")
)

MonthTemplateId to be used for rendering the cells of the Calendar.

C#
public DateTimePickerBuilder MonthTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view to be used for rendering the cells for the Calendar.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.MonthTemplateView(Html.Partial("WidgetMonthTemplate"))
)

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.

C#
public DateTimePickerBuilder ParseFormats(params string[] value)
Parameters:valuestring[]

The value for ParseFormats

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder Popup(Action<DateTimePickerPopupSettingsBuilder> configurator)
Parameters:configuratorAction<DateTimePickerPopupSettingsBuilder>

The DateTimePickerPopupSettingsBuilder for the popup setting.

Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder Readonly()
Returns:

DateTimePickerBuilder

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Readonly()
)

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 DateTimePickerBuilder Readonly(bool value)
Parameters:valuebool

The value for Readonly

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Sets a value controlling the border radius.

C#
public DateTimePickerBuilder Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Rounded(Rounded.Medium)
)

Sets the size of the component.

C#
public DateTimePickerBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value for Size

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Size(ComponentSize.Medium)
)

Represents available types of calendar views.

C#
public DateTimePickerBuilder Start(CalendarView value)
Parameters:valueCalendarView

The value for Start

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Start(CalendarView.Month)
)

If set, specifies the earliest time the TimeView can show.

C#
public DateTimePickerBuilder StartTime(DateTime value)
Parameters:valueDateTime

The value for StartTime

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.StartTime(new DateTime(2023,3,3,8,30,00))
)

Specifies the format, which is used to format the values in the time drop-down list.

C#
public DateTimePickerBuilder TimeFormat(string value)
Parameters:valuestring

The value for TimeFormat

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.TimeFormat("hh:mm:ss tt")
)

Specifies the selected value.

C#
public DateTimePickerBuilder Value(DateTime? value)
Parameters:valueDateTime?

The value that configures the value.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Value(null)
)

Specifies the selected value.

C#
public DateTimePickerBuilder Value(DateTime value)
Parameters:valueDateTime

The value for Value

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Sets the value of the picker input

C#
public DateTimePickerBuilder Value(string date)
Parameters:datestring

The value that configures the value.

Returns:

DateTimePickerBuilder

A reference to the current DateTimePickerBuilder instance, to allow for method chaining.

Example:
C#
@(Html.Kendo().DateTimePicker()
.Name("dateTimePicker")
.Value(DateTime.Now)
)

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.

C#
public DateTimePickerBuilder WeekNumber()
Returns:

DateTimePickerBuilder

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.

C#
public DateTimePickerBuilder WeekNumber(bool value)
Parameters:valuebool

The value for WeekNumber

Returns:

DateTimePickerBuilder

Returns the current DateTimePickerBuilder instance.

Example:
C#
@( Html.Kendo().DateTimePicker()
.Name("DateTimePicker")
.Start(CalendarView.Month)
)