DateInputComponent
Represents the Kendo UI DateInput component for Angular.
<kendo-dateinput></kendo-dateinput>
Definition
Package:@progress/kendo-angular-dateinputs
Selector:kendo-dateinput
Export Name:Accessible in templates as #kendo-dateinputInstance="kendo-dateinput"
Inputs
allowCaretMode
boolean
Specifies if the component displays a blinking caret inside the DateInput when possible.
Set to true to show a blinking caret for better visual feedback.
false
autoCorrectParts
boolean
Specifies if the component automatically corrects invalid date segments.
When set to true, the component fixes invalid segments as you type.
true
autoFill
boolean
Specifies whether to autofill the rest of the date to the current date when the component loses focus.
false
autoSwitchKeys
string[]
Specifies custom keys that move focus to the next date format segment. Provide an array of strings to define which keys trigger the focus change.
[]
autoSwitchParts
boolean
Specifies if the component automatically moves to the next segment after you complete the current one.
When set to true, focus moves to the next segment as soon as you finish typing the current segment.
true
clearButton
boolean
Specifies whether to render a clear button after the input text or DateInput value has been changed.
Clicking this button resets the value of the component to null and triggers the valueChange event.
false
disabled
boolean
Specifies whether the component is disabled (see example). To learn how to disable the component in reactive forms, refer to the article on Forms Support.
false
enableMouseWheel
boolean
Indicates whether the mouse scroll can be used to increase/decrease the time segments values.
true
Specifies the fillMode of the component. The default value is set by the Kendo theme.
format
string | FormatSettings
Specifies the date format that is used to display the input value (see example).
You can provide a string if a single format is going to be used regardless whether the input is focused or blurred. Alternatively, you can provide a FormatSettings object to display different formats when the component is focused or blurred by specifying inputFormat and displayFormat values.
DEFAULT_FORMAT
Defines the descriptions of the format sections in the input field. For more information, refer to the article on placeholders.
incompleteDateValidation
boolean
Specifies whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
false
inputAttributes
{ [key: string]: string }
Specifies 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 date that is valid (see example).
min
Date
Specifies the smallest date that is valid (see example).
placeholder
string
Specifies the hint the DateInput displays when its value is null.
For more information, refer to the article on
placeholders.
rangeValidation
boolean
Specifies whether to enforce the built-in min and max validators when validating a form.
Set to true to enable validation for the min and max values.
true
readonly
boolean
Specifies the read-only state of the DateInput (see example).
false
Specifies the border radius of the component. The default value is set by the Kendo theme.
Specifies the size of the component. The default value is set by the Kendo theme.
spinners
boolean
Specifies whether the Up and Down spin buttons will be rendered. For more information, refer to the article on spinner buttons.
false
Configures the incremental steps of the DateInput. For more information, refer to the article on incremental steps.
{}
tabindex
number
Specifies the tabIndex property of the DateInput.
0
title
string
Specifies the title of the input element of the DateInput.
""
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.
TWO_DIGIT_YEAR_MAX
value
Date
Specifies the value of the DateInput component.
The value has to be a valid JavaScript Date instance or null.
Events
blur
EventEmitter<null>
Fires each time the input element gets blurred (see example).
focus
EventEmitter<null>
Fires each time the user focuses the input element (see example).
valueChange
EventEmitter<Date>
Fires each time the user selects a new value (see example).
Methods
Blurs the DateInput component.
Focuses the DateInput component.
Resets the value of the DateInput component to null and triggers the valueChange event.