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

Represents the Kendo UI DateInput component for Angular.

html
<kendo-dateinput></kendo-dateinput>

Definition

Package:@progress/kendo-angular-dateinputs

Selector:kendo-dateinput

Export Name:Accessible in templates as #kendo-dateinputInstance="kendo-dateinput"

Inputs

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.

Default:

false

Specifies if the component automatically corrects invalid date segments. When set to true, the component fixes invalid segments as you type.

Default:

true

autoFill

boolean

Specifies whether to autofill the rest of the date to the current date when the component loses focus.

Default:

false

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.

Default:

[]

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.

Default:

true

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.

Default:

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.

Default:

false

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

Default:

true

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

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:

DEFAULT_FORMAT

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

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

Default:

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

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

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.

Default:

true

readonly

boolean

Specifies the read-only state of the DateInput (see example).

Default:

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.

Default:

false

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

Default:

{}

tabindex

number

Specifies the tabIndex property of the DateInput.

Default:

0

title

string

Specifies the title of the input element of the DateInput.

Default:

""

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.

Default:

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

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

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

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.