• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs
New to Kendo UI for Angular? Start a free 30-day trial

DateTimePickerComponent

Represents the Kendo UI DateTimePicker component for Angular.

Selector

kendo-datetimepicker

Export Name

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

Inputs

NameTypeDefaultDescription

adaptiveMode

AdaptiveMode

Enables or disables the adaptive mode. By default the adaptive rendering is disabled.

allowCaretMode

boolean

false

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

animateCalendarNavigation

boolean

false

Determines whether to enable animation when navigating to previous/next Calendar view. Applies to the classic Calendar only.

This feature uses the Web Animations API. In order to run the animation in browsers that do not support it, you need the web-animations-js polyfill.

autoFill

boolean

false

When enabled, the DateTimePicker will autofill the rest of the date to the current date when the component loses focus.

autoSwitchKeys

string[]

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

autoSwitchParts

boolean

true

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

calendarType

CalendarType

Specifies the Calendar type.

The possible values are:

  • infinite (default)
  • classic

cancelButton

boolean

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

defaultTab

DateTimePickerActiveTab

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

disabled

boolean

Sets or gets the disabled property of the DateTimePicker and determines whether the component is active (see example). To learn how to disable the component in reactive forms, refer to the article on Forms Support.

disabledDates

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

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

disabledDatesValidation

boolean

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

enableMouseWheel

boolean

true

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

fillMode

DateInputFillMode

Sets the fillMode of the component.

The possible values are:

  • solid (Default)
  • flat
  • outline
  • none

focusedDate

Date

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

boolean

false

Toggles the visibility of the Calendar footer.

format

string | FormatSettings

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

Format value options:

  • string - Provide a string if a single format is going to be used regardless whether the input is focused or blurred.
  • FormatSettings - To display different formats when the component is focused or blurred, provide a settings object with specified inputFormat and displayFormat values.

If a FormatSettings object is provided, the displayFormat value will be used for the popup TimePicker.

formatPlaceholder

DateInputFormatPlaceholder

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

incompleteDateValidation

boolean

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

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

placeholder

string

Specifies the hint which is displayed by the DateTimePicker when its value is null (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.

rangeValidation

boolean

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

readonly

boolean

false

Sets the read-only state of the DateTimePicker (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.

rounded

DateInputRounded

Sets the border radius of the component.

The possible values are:

  • small
  • medium (Default)
  • large
  • full
  • none

showOtherMonthDays

boolean

Displays the days that fall out of the current month in the Calendar (see example). The default values per Calendar type are:

  • infinite - false
  • classic - true

size

DateInputSize

Sets the size of the component.

The possible values are:

  • small
  • medium (Default)
  • large
  • none

steps

DateInputIncrementalSteps

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

subtitle

string

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

tabindex

number

Specifies the tabindex of the DateTimePicker.

title

string

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

twoDigitYearMax

number

The maximum year to assume to be from the current century when typing two-digit year value (see example).

The default value is 68, indicating that typing any value less than 69 will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.

value

Date

Specifies the value of the DateTimePicker component.

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

weekDaysFormat?

WeekDaysFormat

'short'

Sets the format of the displayed Calendar week days' names.

weekNumber

boolean

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

Fields

NameTypeDefaultDescription

isActive

boolean

Indicates whether the component or its popup content is focused.

isOpen

boolean

Indicates whether the component is currently open. That is when the popup or actionSheet is open.

Events

NameTypeDescription

close

EventEmitter<PreventableEvent>

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

blur

EventEmitter<any>

Fires each time the user blurs the component (see example).

focus

EventEmitter<any>

Fires each time the user focuses the component (see example).

open

EventEmitter<PreventableEvent>

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

valueChange

EventEmitter<Date>

Fires each time the user selects a new value (see 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 or actionSheet. If you use the toggle method to show or hide the popup or actionSheet, the open and close events do not fire. (more information and example).

Parameters

show?

boolean

The state of the popup.