DateTimePickerComponent
Represents the Kendo UI DateTimePicker component for Angular. Allows users to select both date and time values from an interactive calendar and time selector.
@Component({
selector: 'my-app',
template: `
<kendo-datetimepicker
[(value)]="dateTimeValue"
[format]="'g'"
[min]="minDate"
[max]="maxDate">
</kendo-datetimepicker>
`
})
export class AppComponent {
public dateTimeValue: Date = new Date();
public minDate: Date = new Date(2000, 0, 1);
public maxDate: Date = new Date(2030, 11, 31);
}
Selector
kendo-datetimepicker
Export Name
Accessible in templates as #kendoDateTimePickerInstance="kendo-datetimepicker"
Inputs
Name | Type | Default | Description |
---|---|---|---|
adaptiveMode |
|
|
Enables or disables the adaptive mode. The adaptive rendering is disabled by default. |
adaptiveSubtitle |
|
|
Specifies the subtitle text rendered in the header of the popup (action sheet).
Applicable only when |
adaptiveTitle |
|
|
Specifies 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 |
allowCaretMode |
|
|
Determines whether you can see a blinking caret inside the DateInput when possible. |
animateCalendarNavigation |
|
|
Determines whether to enable animation when navigating to previous/next Calendar view.
Applies to the The feature uses the Web Animations API. In order to run the animation in browsers that do not support it, you need the |
autoCorrectParts |
|
|
Determines whether to auto correct invalid segments automatically. |
autoFill |
|
|
Auto fills the rest of the date to the current date when the component loses focus. |
autoSwitchKeys |
|
Specifies custom keys that move the focus to the next date format segment. | |
autoSwitchParts |
|
|
Determines whether to automatically move to the next segment after the user completes the current one. |
calendarType |
|
|
Specifies the Calendar type. |
cancelButton |
|
|
Determines whether to display the Cancel button in the popup (see example). |
clearButton |
|
|
Renders a clear button when set to |
defaultTab |
|
Specifies the active tab when opening the popup (see example). | |
disabled |
|
|
Specifies the |
disabledDates |
|
Sets the dates of the DateTimePicker that will be disabled (see example). | |
disabledDatesValidation |
|
|
Determines whether the built-in validator for disabled date ranges is enforced when validating a form (see example). |
enableMouseWheel |
|
|
Determines whether you can use the mouse scroll to increase or decrease the time segment values. |
fillMode |
|
Specifies the fill mode of the component. | |
focusedDate |
|
Specifies the focused date of the popup Calendar (see example). | |
footer |
|
|
Toggles the visibility of the Calendar footer. |
format |
|
Specifies the date format for displaying the input value (see example). When using a string format, the same format is applied regardless of whether the input is focused or blurred. When using a FormatSettings object, you can specify different inputFormat and displayFormat values for focused and blurred states. If a FormatSettings object is provided, the displayFormat value will be used for the popup TimePicker. | |
formatPlaceholder |
|
Defines the descriptions of the format sections in the input field (see example). | |
incompleteDateValidation |
|
|
Determines whether the built-in validation for incomplete dates is enforced when validating a form. |
inputAttributes |
|
Specifies the HTML attributes of the inner focusable input element. You cannot change attributes that are essential for certain component functionalities. | |
max |
|
Specifies the biggest valid date.
The Calendar will not display dates after this value.
If the | |
min |
|
Specifies the smallest valid date.
The Calendar will not display dates before this value.
If the | |
placeholder |
|
Specifies the hint which is displayed by the DateTimePicker when its value is | |
popupSettings |
|
Configures the popup settings of the DateTimePicker (see example). The available options are animate which controls the popup animation and by default, the open and close animations are enabled.
The | |
rangeValidation |
|
|
Determines whether the built-in |
readonly |
|
|
Specifies the read-only state of the DateTimePicker (see example). |
readOnlyInput |
|
|
Determines whether the input field of the DateTimePicker is read-only (see example). If you set the |
rounded |
|
Specifies the border radius of the component. | |
showOtherMonthDays |
|
Displays the days that fall out of the current month in the Calendar (see example). You can set this to show or hide days from other months. For infinite Calendar the default value is | |
size |
|
Specifies the size of the component. | |
steps |
|
Configures the incremental steps of the DateInput and the popup component of the TimePicker (see example). | |
tabindex |
|
Specifies the | |
twoDigitYearMax |
|
|
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 |
|
Sets the value of the DateTimePicker component. You can set a specific date and time for the picker to display and use. The | |
weekDaysFormat? |
|
|
Sets the format of the displayed Calendar week days' names. |
weekNumber |
|
|
Determines whether to display a week number column in the |
Fields
Name | Type | Default | Description |
---|---|---|---|
isActive |
|
Indicates whether the component or its popup content is focused. | |
isOpen |
|
Indicates whether the component is currently open. This is when the popup or action sheet is open. |
Events
Name | Type | Description |
---|---|---|
close |
|
Fires each time the popup is about to close
(see example).
This event is preventable. If you cancel the event by setting |
blur |
|
Fires each time the user blurs the component (see example). |
focus |
|
Fires each time the user focuses the component (see example). |
open |
|
Fires each time the popup is about to open
(see example).
This event is preventable. If you cancel the event by setting |
valueChange |
|
Fires each time the user selects a new value (see example). |
Methods
blur |
---|
Blurs the DateTimePicker component. |
focus |
---|
Focuses the DateTimePicker input if the popup is closed. Moves the focus to the popup content if the popup is open. |
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the visibility of the popup or action sheet.
If you use the | ||||||
|