DateTimePickerComponent

Represents the Kendo UI DateTimePicker component for Angular.

Selector

kendo-datetimepicker

Export Name

Accessible in templates as #kendoDateTimePickerInstance="kendo-datetimepicker"

Inputs

cancelButton boolean

Determines whether to display the Cancel button in the popup
(see example).

disabled boolean

Sets or gets the disabled property of the DateTimePicker and determines whether the component is active
(see example).

disabledDatesValidation boolean

Determines whether the built-in validator for disabled
date ranges is enforced when validating a form
(see example).

focusedDate Date

Specifies the focused date of the popup Calendar
(see example).

formatPlaceholder DateInputFormatPlaceholder

Defines the descriptions of the format sections in the input field
(see example).

placeholder string

Specifies the hint which is displayed by the DateTimePicker when its value is null
(see example).

rangeValidation boolean

Determines whether the built-in min or max validators are enforced when validating a form
(see example).

readOnlyInput boolean

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

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

readonly boolean

Sets the read-only state of the DateTimePicker
(see example).

steps DateInputIncrementalSteps

Configures the incremental steps of the DateInput and the popup component of the TimePicker
(see example).

title string

Sets the title of the input element of the DateTimePicker.

weekNumber boolean

Determines whether to display a week number column in the month view of the popup Calendar
(see example).

defaultTab DateTimePickerActiveTab

Sets the active tab on opening the popup
(see example).

disabledDates (date: Date) => boolean | Date[] | Day[]

Sets the dates of the DateTimePicker that will be disabled
(see example).

format string

Specifies the date format for displaying the input value
(see example).

max Date

Specifies the biggest valid date.
The Calendar will not display dates after this value.
If the max value of the Calendar is selected, the TimePicker will not display
time entries after the specified time portion of this value
(see example).

min Date

Specifies the smallest valid date.
The Calendar will not display dates before this value.
If the min value of the Calendar is selected, the TimePicker will not display
time entries before the specified time portion of this value
(see example).

popupSettings PopupSettings

Configures the popup settings of the DateTimePicker
(see example).

The available options are:

  • animate: Boolean—Controls the popup animation. By default, the open and close animations are enabled.
  • appendTo: 'root' | 'component' | ViewContainerRef—Controls the popup container. By default, the popup will be appended to the root component.
  • popupClass: String—Specifies a list of CSS classes that are used to style the popup.

tabindex number

Specifies the tabindex of the DateTimePicker.

value Date

Specifies the value of the DateTimePicker component.

The value has to be a valid JavaScript Date instance.

Fields

isActive boolean

Indicates whether the component or its popup content is focused.

isOpen boolean

Indicates whether the component is currently open.

Events

close EventEmitter<PreventableEvent>

Fires each time the popup is about to close.
This event is preventable. If you cancel the event by setting event.preventDefault(), the popup will remain open.
(more information and example).

blur EventEmitter<any>

Fires each time the user blurs the component.
(more information and example).

focus EventEmitter<any>

Fires each time the user focuses the component.
(more information and example).

open EventEmitter<PreventableEvent>

Fires each time the popup is about to open.
This event is preventable. If you cancel the event by setting event.preventDefault(), the popup will remain closed.
(more information and example).

valueChange EventEmitter<Date>

Fires each time the user selects a new value.
(more information and example).

Methods

blur

Blurs the DateTimePicker.

focus

  • If the popup is closed, focuses the DateTimePicker input.
  • If the popup is open, the focus is moved to its content.

toggle

Toggles the visibility of the popup. If you use the toggle method to show or hide the popup,
the open and close events do not fire.
(more information and example).

Parameters

show? boolean

The state of the popup.