New to Kendo UI for AngularStart a free 30-day trial

Definition

Package:@progress/kendo-angular-dateinputs

Selector:kendo-timepicker

Export Name:Accessible in templates as #kendo-timepickerInstance="kendo-timepicker"

Syntax:

TS
@Component({
  selector: 'my-app',
  template: `
    <kendo-timepicker [(value)]="selectedTime"></kendo-timepicker>
  `
})
export class AppComponent {
  public selectedTime: Date = new Date();
}

Inputs

Determines whether the TimePicker is in adaptive mode.

Default:

'none'

Sets the subtitle text rendered in the header of the popup(action sheet). Applicable only when AdaptiveMode is set to auto. By default, subtitle is not rendered.

Sets the title of the input element of the TimePicker and the title text rendered in the header of the popup(action sheet). Applicable only when AdaptiveMode is set to auto.

Default:

''

Determines if the users should see a blinking caret inside the Date Input when possible.

Default:

false

A string array representing custom keys, which will move the focus to the next date format segment.

Default:

[]

Determines whether to automatically move to the next segment after the user completes the current one.

Default:

true

Determines whether to display the Cancel button in the popup.

Default:

true

If set to true, renders a clear button after the input text or TimePicker value has been changed. Clicking this button resets the value of the component to null and triggers the valueChange event.

Default:

false

disabled

boolean

Determines whether the TimePicker is disabled (see example). To learn how to disable the component in reactive forms, refer to the article on Forms Support.

Default:

false

Indicates whether the mouse scroll can be used to increase/decrease the time segments values.

Default:

true

Sets the fillMode of the component. The default value is set by the Kendo theme.

format

string

Specifies the time format that is used to display the input value (see example).

Default:

't'

Defines the descriptions of the format sections in the input field. For more information, refer to the article on placeholders.

Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.

Default:

false

inputAttributes

{ [key: string]: string }

Sets the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.

max

Date

Specifies the biggest valid time value (see example).

Default:

23:59:59

min

Date

Specifies the smallest valid time value (see example).

Default:

00:00:00

nowButton

boolean

Determines whether to display the Now button in the popup.

If the current time is out of range or the incremental step is greater than 1, the Now button will be hidden.

Default:

true

Specifies the hint the TimePicker displays when its value is null. For more information, refer to the article on placeholders.

Default:

null

Configures the popup of the TimePicker.

The available options are animate which controls the popup animation and by default, the open and close animations are enabled. The appendTo option controls the popup container and by default, the popup will be appended to the root component. The popupClass option specifies a list of CSS classes that are used to style the popup.

Determines whether the built-in min or max validators are enforced when a form is being validated.

Default:

true

readonly

boolean

Determines the read-only state of the TimePicker (see example).

Default:

false

Sets the read-only state of the TimePicker input field (see example).

If you set the readonly property value to true, the input will be rendered in a read-only state regardless of the readOnlyInput value.

Default:

false

Sets the rounded styling of the component. The default value is set by the Kendo theme.

Sets the size of the component. The default value is set by the Kendo theme.

Configures the incremental steps of the TimePicker. For more information, refer to the article on incremental steps.

If the incremental step is greater than 1, the Now button will be hidden.

tabindex

number

Sets the tabindex of the TimePicker component.

Default:

0

value

Date

Determines whether the TimePicker is in adaptive mode.

The value has to be a valid JavaScript Date instance or null.

Fields

isOpen

boolean

Returns whether the component is currently open. That is when the popup or ActionSheet is open.

Events

Fires each time the input element gets blurred (see example).

Fires each time the popup is about to close (see example). This event is preventable. If you cancel the event, the popup will remain open.

Fires each time the user focuses the input element (see example).

Fires each time the popup is about to open (see example). This event is preventable. If you cancel the event, the popup will remain closed.

Fires each time the user selects a new value (see example).

Methods

Blurs the TimePicker component.

Focuses the TimePicker component.

Toggles the visibility of the popup or ActionSheet. If you use the toggle method to show or hide the popup or ActionSheet, the open and close events do not fire.

Parameters:show?boolean

The state of the popup.