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

TimePickerBuilder

Properties

WriteAction - Func

Methods

Animation(System.Boolean)

Use to enable or disable animation of the popup element.

Parameters

enable - System.Boolean

The boolean value.

Example


            @( Html.Kendo().DatePicker()
                       .Name("DatePicker")
                       .Animation(false) //toggle effect
            )

Animation(System.Action)

Configures the animation effects of the widget.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action which configures the animation effects.

Example


            @( Html.Kendo().DatePicker()
                       .Name("DatePicker")
                       .Animation(animation =>
                       {
                            animation.Open(open =>
                            {
                                open.SlideIn(SlideDirection.Down);
                            })
                       })
            )

Enable(System.Boolean)

Enables or disables the picker.

Parameters

value - System.Boolean

Value(System.Nullable)

Sets the value of the picker input

Parameters

date - System.Nullable<DateTime>

Value(System.String)

Sets the value of the picker input

Parameters

date - System.String

Value(System.Nullable)

Sets the value of the picker input

Parameters

time - System.Nullable<TimeSpan>

Min(System.TimeSpan)

Sets the minimum time, which can be selected in timepicker

Parameters

value - System.TimeSpan

Min(System.String)

Sets the minimum time, which can be selected in timepicker

Parameters

value - System.String

Max(System.TimeSpan)

Sets the maximum time, which can be selected in timepicker

Parameters

value - System.TimeSpan

Max(System.String)

Sets the maximum time, which can be selected in timepicker

Parameters

value - System.String

BindTo(System.Collections.Generic.IList)

Binds the TimePicker to a list of DateTime objects.

Parameters

dates - System.Collections.Generic.IList<DateTime>

Example


             @( Html.Kendo().TimePicker()
                        .Name("TimePicker")
                        .BindTo(new List<DateTime>
                        {
                            DateTime.Now
                        }))

ComponentType(System.String)

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

Parameters

value - System.String

The value for ComponentType

Culture(System.String)

Specifies the culture info used by the widget.

Parameters

value - System.String

The value for Culture

DateInput(System.Boolean)

Specifies if the TimePicker will use DateInput for editing value

Parameters

value - System.Boolean

The value for DateInput

DateInput()

Specifies if the TimePicker will use DateInput for editing value

Dates(System.DateTime[])

Specifies a list of dates, which are shown in the time drop-down list. If not set, the TimePicker will auto-generate the available times.

Parameters

value - System.DateTime[]

The value for Dates

FocusTime(System.DateTime)

Specifies a time that will be focused inside the popup when opened.

Parameters

value - System.DateTime

The value for FocusTime

Format(System.String)

Specifies the format, which is used to format the value of the TimePicker 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.

Parameters

value - System.String

The value for Format

Label(System.Action)

Adds a label before the timepicker. If the timepicker has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

Parameters

configurator - System.Action<TimePickerLabelSettingsBuilder>

The configurator for the label setting.

Interval(System.Int32)

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

Parameters

value - System.Int32

The value for Interval

Max(System.DateTime)

Specifies the end value in the popup list.

Parameters

value - System.DateTime

The value for Max

Messages(System.Action)

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

Parameters

configurator - System.Action<TimePickerMessagesSettingsBuilder>

The configurator for the messages setting.

Min(System.DateTime)

Specifies the start value in the popup list.

Parameters

value - System.DateTime

The value for Min

ParseFormats(System.String[])

Specifies the formats, which are used to parse the value set with the value method or by direct input. If not set the value of the options.format will be used. Note that value of the format option is always used.

Parameters

value - System.String[]

The value for ParseFormats

Popup(System.Action)

The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.

Parameters

configurator - System.Action<TimePickerPopupSettingsBuilder>

The configurator for the popup setting.

Value(System.DateTime)

Specifies the selected time.

Parameters

value - System.DateTime

The value for Value

Size(Kendo.Mvc.UI.ComponentSize)

Sets the size of the component.

Parameters

value - ComponentSize

The value for Size

Rounded(Kendo.Mvc.UI.Rounded)

Sets a value controlling the border radius.

Parameters

value - Rounded

The value for Rounded

FillMode(Kendo.Mvc.UI.FillMode)

Sets a value controlling how the color is applied.

Parameters

value - FillMode

The value for FillMode

AdaptiveMode(Kendo.Mvc.UI.AdaptiveMode)

Specifies the adaptive rendering of the component.

Parameters

value - AdaptiveMode

The value for AdaptiveMode

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<TimePickerEventBuilder>

The client events action.

Example


            @(Html.Kendo().TimePicker()
                  .Name("TimePicker")
                  .Events(events => events
                      .Change("onChange")
                  )
            )

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

Render()

Renders the component in place.

ToHtmlString()

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

AsChildComponent()

Configures the widget as a child component.

In this article
Not finding the help you need?