DatePickerComponent
Represents the Kendo UI DatePicker component for Angular. Provides a user-friendly way to select dates with a calendar popup (see example).
@Component({
selector: 'my-app',
template: `
<kendo-datepicker
[value]="selectedDate"
</kendo-datepicker>
`
})
export class AppComponent {
selectedDate = new Date();
}
Selector
kendo-datepicker
Export Name
Accessible in templates as #kendoDatePickerInstance="kendo-datepicker"
Inputs
Name | Type | Default | Description |
---|---|---|---|
activeView |
|
|
Specifies the active view that the Calendar initially renders (see example). You have to set |
adaptiveMode |
|
|
Specifies whether to enable adaptive rendering. When enabled, the DatePicker automatically switches between a calendar popup on larger screens and an ActionSheet on mobile devices. |
adaptiveSubtitle |
|
|
Sets the subtitle text rendered in the header of the popup(action sheet).
Applicable only when |
adaptiveTitle |
|
|
Sets the title of the input element of the DatePicker and the title text rendered
in the header of the popup(action sheet). Applicable only when |
allowCaretMode |
|
|
Determines if the users should see a blinking caret inside the Date Input when possible. |
animateCalendarNavigation |
|
|
Determines whether to enable animation when navigating to previous/next Calendar view.
Applies to the This 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 autocorrect invalid segments automatically. |
autoFill |
|
|
When enabled, the DatePicker will autofill the rest of the date to the current date when the component loses focus. |
autoSwitchKeys |
|
A string array representing custom keys, which will 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. |
bottomView |
|
|
Specifies the bottommost Calendar view to which you can navigate (see example). |
calendarType |
|
|
Specifies the Calendar type. |
clearButton |
|
|
Renders a clear button when set to |
disabled |
|
Specifies or gets the | |
disabledDates |
|
Sets the dates of the DatePicker 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 |
|
|
Indicates whether the mouse scroll can be used to increase/decrease the time segments values. |
fillMode |
|
|
Specifies the fillMode of the component. |
focusedDate |
|
|
Specifies the focused date of the Calendar component (see example). |
footer |
|
|
Controls the visibility of the Calendar footer. |
format |
|
Specifies the date format that is used to display the input value (see example). Format value options include string to provide a single format that is used regardless whether the input is focused or blurred. FormatSettings can be used to display different formats when the component is focused or blurred by providing a settings object with specified inputFormat and displayFormat values. | |
formatPlaceholder |
|
Defines the descriptions of the format sections in the input field. (more information and examples). | |
incompleteDateValidation |
|
|
Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated. |
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 (see example). |
min |
|
|
Specifies the smallest valid date (see example). |
navigation |
|
Sets or gets the | |
placeholder |
|
|
Specifies the hint the DatePicker displays when its value is |
popupSettings |
|
Configures the popup options of the DatePicker. The available options are animate which controls the popup animation and by default, the open and close animations are enabled. The appendTo option controls the popup container and by default, the popup will be appended to the root component. The popupClass option specifies a list of CSS classes that are used to style the popup. | |
rangeValidation |
|
|
Determines whether the built-in min or max validators are enforced when validating a form. |
readonly |
|
|
Specifies the read-only state of the DatePicker (see example). |
readOnlyInput |
|
Sets the read-only state of the DatePicker input field (see example). If you set the | |
rounded |
|
|
Specifies the border radius of the component. |
showOtherMonthDays |
|
Shows the days that fall outside the current month in the Calendar (see example).
The default value is | |
size |
|
|
Sets the size of the component. |
tabindex |
|
|
Sets the |
topView |
|
|
Specifies the topmost Calendar view to which you can navigate (see example). |
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 |
|
Specifies the value of the DatePicker component. The | |
weekDaysFormat? |
|
|
Specifies 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 |
---|---|---|---|
isOpen |
|
Indicates whether the component is currently open. That is when the popup or actionSheet 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, the popup will remain open. |
blur |
|
Fires each time the input element gets blurred (see example). |
focus |
|
Fires each time the user focuses the input element (see example). |
open |
|
Fires each time the popup is about to open (see example). This event is preventable. If you cancel the event, the popup will remain closed. |
valueChange |
|
Fires each time the user selects a new value (see example). |
Methods
blur |
---|
Blurs the DatePicker component. |
focus |
---|
Focuses the DatePicker component. |
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the visibility of the popup or actionSheet.
If you use the | ||||||
|