@progress/kendo-angular-dateinputs 19.1.2-develop.3 → 19.1.2-develop.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/calendar.component.d.ts +40 -56
- package/calendar/calendar.module.d.ts +10 -21
- package/calendar/calendars.module.d.ts +10 -21
- package/calendar/localization/calendar-custom-messages.component.d.ts +9 -1
- package/calendar/localization/multiview-calendar-custom-messages.component.d.ts +9 -1
- package/calendar/models/orientation.d.ts +10 -1
- package/calendar/models/selection-range-end.type.d.ts +11 -1
- package/calendar/models/selection-range.interface.d.ts +18 -3
- package/calendar/models/selection.d.ts +19 -4
- package/calendar/models/type.d.ts +7 -3
- package/calendar/models/view.type.d.ts +12 -1
- package/calendar/multiview-calendar.component.d.ts +49 -40
- package/calendar/multiview-calendar.module.d.ts +1 -0
- package/calendar/templates/cell-template.directive.d.ts +16 -19
- package/calendar/templates/century-cell-template.directive.d.ts +15 -19
- package/calendar/templates/decade-cell-template.directive.d.ts +15 -19
- package/calendar/templates/footer-template.directive.d.ts +16 -17
- package/calendar/templates/header-template.directive.d.ts +19 -18
- package/calendar/templates/header-title-template.directive.d.ts +15 -18
- package/calendar/templates/month-cell-template.directive.d.ts +15 -17
- package/calendar/templates/navigation-item-template.directive.d.ts +15 -18
- package/calendar/templates/weeknumber-cell-template.directive.d.ts +15 -17
- package/calendar/templates/year-cell-template.directive.d.ts +15 -20
- package/codemods/utils.js +0 -3
- package/dateinput/dateinput.component.d.ts +50 -119
- package/dateinput/dateinput.module.d.ts +15 -2
- package/dateinput/localization/dateinput-custom-messages.component.d.ts +18 -1
- package/dateinput/models/format-placeholder.model.d.ts +15 -20
- package/dateinput/models/format-settings.model.d.ts +14 -4
- package/dateinput/models/incremental-steps.model.d.ts +16 -1
- package/datepicker/datepicker.component.d.ts +68 -127
- package/datepicker/datepicker.module.d.ts +11 -2
- package/datepicker/localization/datepicker-custom-messages.component.d.ts +11 -1
- package/daterange/auto-correct-on.type.d.ts +2 -1
- package/daterange/date-range-end-input.directive.d.ts +25 -24
- package/daterange/date-range-popup-template.directive.d.ts +13 -2
- package/daterange/date-range-popup.component.d.ts +83 -73
- package/daterange/date-range-selection.directive.d.ts +10 -9
- package/daterange/date-range-start-input.directive.d.ts +29 -27
- package/daterange/date-range.component.d.ts +4 -6
- package/daterange/date-range.service.d.ts +27 -27
- package/datetimepicker/datetimepicker.component.d.ts +91 -79
- package/datetimepicker/datetimepicker.module.d.ts +16 -2
- package/datetimepicker/localization/datetimepicker-custom-messages.component.d.ts +10 -1
- package/esm2022/calendar/calendar.component.mjs +40 -56
- package/esm2022/calendar/calendar.module.mjs +10 -21
- package/esm2022/calendar/calendars.module.mjs +10 -21
- package/esm2022/calendar/localization/calendar-custom-messages.component.mjs +9 -1
- package/esm2022/calendar/localization/multiview-calendar-custom-messages.component.mjs +9 -1
- package/esm2022/calendar/models/selection-range.interface.mjs +2 -0
- package/esm2022/calendar/models/selection.mjs +11 -0
- package/esm2022/calendar/multiview-calendar.component.mjs +49 -40
- package/esm2022/calendar/multiview-calendar.module.mjs +1 -0
- package/esm2022/calendar/templates/cell-template.directive.mjs +16 -19
- package/esm2022/calendar/templates/century-cell-template.directive.mjs +15 -19
- package/esm2022/calendar/templates/decade-cell-template.directive.mjs +15 -19
- package/esm2022/calendar/templates/footer-template.directive.mjs +16 -17
- package/esm2022/calendar/templates/header-template.directive.mjs +19 -18
- package/esm2022/calendar/templates/header-title-template.directive.mjs +15 -18
- package/esm2022/calendar/templates/month-cell-template.directive.mjs +15 -17
- package/esm2022/calendar/templates/navigation-item-template.directive.mjs +15 -18
- package/esm2022/calendar/templates/weeknumber-cell-template.directive.mjs +15 -17
- package/esm2022/calendar/templates/year-cell-template.directive.mjs +15 -20
- package/esm2022/dateinput/dateinput.component.mjs +57 -126
- package/esm2022/dateinput/dateinput.module.mjs +15 -2
- package/esm2022/dateinput/localization/dateinput-custom-messages.component.mjs +18 -1
- package/esm2022/datepicker/datepicker.component.mjs +71 -130
- package/esm2022/datepicker/datepicker.module.mjs +11 -2
- package/esm2022/datepicker/localization/datepicker-custom-messages.component.mjs +11 -1
- package/esm2022/daterange/date-range-end-input.directive.mjs +25 -24
- package/esm2022/daterange/date-range-popup-template.directive.mjs +13 -2
- package/esm2022/daterange/date-range-popup.component.mjs +83 -73
- package/esm2022/daterange/date-range-selection.directive.mjs +10 -9
- package/esm2022/daterange/date-range-start-input.directive.mjs +29 -27
- package/esm2022/daterange/date-range.component.mjs +4 -6
- package/esm2022/daterange/date-range.service.mjs +27 -27
- package/esm2022/datetimepicker/datetimepicker.component.mjs +94 -82
- package/esm2022/datetimepicker/datetimepicker.module.mjs +16 -2
- package/esm2022/datetimepicker/localization/datetimepicker-custom-messages.component.mjs +10 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/timepicker/localization/messages.mjs +14 -14
- package/esm2022/timepicker/localization/timepicker-custom-messages.component.mjs +12 -1
- package/esm2022/timepicker/timepicker.component.mjs +57 -119
- package/esm2022/timepicker/timepicker.module.mjs +13 -2
- package/esm2022/timepicker/timeselector.component.mjs +24 -40
- package/fesm2022/progress-kendo-angular-dateinputs.mjs +913 -1015
- package/package.json +13 -12
- package/popup-settings.model.d.ts +3 -10
- package/timepicker/localization/messages.d.ts +14 -14
- package/timepicker/localization/timepicker-custom-messages.component.d.ts +12 -1
- package/timepicker/timepicker.component.d.ts +53 -115
- package/timepicker/timepicker.module.d.ts +13 -2
- package/timepicker/timeselector.component.d.ts +24 -40
|
@@ -5,28 +5,25 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* A directive for customizing the header title in the Calendar component.
|
|
9
|
+
*
|
|
10
|
+
* This directive allows you to define a custom template for rendering the header title content.
|
|
11
|
+
* The template context provides access to the title text, current date, and active view.
|
|
12
|
+
*
|
|
13
|
+
* Template Context Variables:
|
|
14
|
+
* - `title` - The formatted title text for the header
|
|
15
|
+
* - `date` - The Date object representing the current header context
|
|
16
|
+
* - `activeView` - The current active view of the Calendar
|
|
13
17
|
*
|
|
14
18
|
* For more examples, refer to the article on [templates]({% slug templates_calendar %}).
|
|
15
19
|
*
|
|
16
20
|
* @example
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* <ng-template kendoCalendarHeaderTitleTemplate let-title>
|
|
24
|
-
* <span class="custom">{{title}}</span>
|
|
25
|
-
* </ng-template>
|
|
26
|
-
* </kendo-calendar>
|
|
27
|
-
* `
|
|
28
|
-
* })
|
|
29
|
-
* export class AppComponent { }
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-calendar>
|
|
23
|
+
* <ng-template kendoCalendarHeaderTitleTemplate let-title let-activeView="activeView">
|
|
24
|
+
* <span class="custom">{{title}} ({{activeView}})</span>
|
|
25
|
+
* </ng-template>
|
|
26
|
+
* </kendo-calendar>
|
|
30
27
|
* ```
|
|
31
28
|
*/
|
|
32
29
|
export class HeaderTitleTemplateDirective {
|
|
@@ -5,27 +5,25 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* A directive for customizing the month cells in the Calendar component.
|
|
9
|
+
*
|
|
10
|
+
* This directive allows you to define a custom template for rendering the content of month cells
|
|
11
|
+
* when the Calendar is in year view. The template context provides access to the current date
|
|
12
|
+
* and cell context information.
|
|
13
|
+
*
|
|
14
|
+
* Template Context Variables:
|
|
15
|
+
* - `date` - The Date object representing the current cell's date
|
|
16
|
+
* - `cellContext` - Additional context information about the current month cell
|
|
12
17
|
*
|
|
13
18
|
* For more examples, refer to the article on [templates]({% slug templates_calendar %}).
|
|
14
19
|
*
|
|
15
20
|
* @example
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* <ng-template kendoCalendarMonthCellTemplate let-context="cellContext">
|
|
23
|
-
* <span class="custom">{{context.formattedValue}}</span>
|
|
24
|
-
* </ng-template>
|
|
25
|
-
* </kendo-calendar>
|
|
26
|
-
* `
|
|
27
|
-
* })
|
|
28
|
-
* export class AppComponent { }
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-calendar [activeView]="'year'">
|
|
23
|
+
* <ng-template kendoCalendarMonthCellTemplate let-context="cellContext">
|
|
24
|
+
* <span class="custom">{{context.formattedValue}}</span>
|
|
25
|
+
* </ng-template>
|
|
26
|
+
* </kendo-calendar>
|
|
29
27
|
* ```
|
|
30
28
|
*/
|
|
31
29
|
export class MonthCellTemplateDirective {
|
|
@@ -5,28 +5,25 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* A directive for customizing the navigation items in the Calendar component.
|
|
9
|
+
*
|
|
10
|
+
* This directive allows you to define a custom template for rendering the content of navigation items
|
|
11
|
+
* in the Calendar header. The template context provides access to the title, current date, and active view.
|
|
12
|
+
*
|
|
13
|
+
* Template Context Variables:
|
|
14
|
+
* - `title` - The formatted title text for the navigation item
|
|
15
|
+
* - `date` - The Date object representing the current navigation context
|
|
16
|
+
* - `activeView` - The current active view of the Calendar
|
|
13
17
|
*
|
|
14
18
|
* For more examples, refer to the article on [templates]({% slug templates_calendar %}).
|
|
15
19
|
*
|
|
16
20
|
* @example
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* <ng-template kendoCalendarNavigationItemTemplate let-title>
|
|
24
|
-
* <span class="custom">{{title}}</span>
|
|
25
|
-
* </ng-template>
|
|
26
|
-
* </kendo-calendar>
|
|
27
|
-
* `
|
|
28
|
-
* })
|
|
29
|
-
* export class AppComponent { }
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-calendar>
|
|
23
|
+
* <ng-template kendoCalendarNavigationItemTemplate let-title let-date="date">
|
|
24
|
+
* <span class="custom">{{title}} - {{date | date:'yyyy'}}</span>
|
|
25
|
+
* </ng-template>
|
|
26
|
+
* </kendo-calendar>
|
|
30
27
|
* ```
|
|
31
28
|
*/
|
|
32
29
|
export class NavigationItemTemplateDirective {
|
|
@@ -5,27 +5,25 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* A directive for customizing the week number cells in the Calendar component.
|
|
9
|
+
*
|
|
10
|
+
* This directive allows you to define a custom template for rendering the content of week number cells
|
|
11
|
+
* in the month view when the weekNumber property is enabled. The template context provides access to
|
|
12
|
+
* the current date and cell context information.
|
|
13
|
+
*
|
|
14
|
+
* Template Context Variables:
|
|
15
|
+
* - `date` - The Date object representing the current week's date
|
|
16
|
+
* - `cellContext` - Additional context information about the current week number cell
|
|
12
17
|
*
|
|
13
18
|
* For more examples, refer to the article on [templates]({% slug templates_calendar %}).
|
|
14
19
|
*
|
|
15
20
|
* @example
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* <ng-template kendoCalendarWeekNumberCellTemplate let-context="cellContext">
|
|
23
|
-
* <span class="custom">{{context.formattedValue}}</span>
|
|
24
|
-
* </ng-template>
|
|
25
|
-
* </kendo-calendar>
|
|
26
|
-
* `
|
|
27
|
-
* })
|
|
28
|
-
* export class AppComponent { }
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-calendar [weekNumber]="true">
|
|
23
|
+
* <ng-template kendoCalendarWeekNumberCellTemplate let-context="cellContext">
|
|
24
|
+
* <span class="custom">W{{context.formattedValue}}</span>
|
|
25
|
+
* </ng-template>
|
|
26
|
+
* </kendo-calendar>
|
|
29
27
|
* ```
|
|
30
28
|
*/
|
|
31
29
|
export class WeekNumberCellTemplateDirective {
|
|
@@ -5,30 +5,25 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* the
|
|
12
|
-
*
|
|
8
|
+
* A directive for customizing the year cells in the Calendar component.
|
|
9
|
+
*
|
|
10
|
+
* This directive allows you to define a custom template for rendering the content of year cells
|
|
11
|
+
* when the Calendar is in year view. The template context provides access to the current date
|
|
12
|
+
* and cell context information.
|
|
13
|
+
*
|
|
14
|
+
* Template Context Variables:
|
|
15
|
+
* - `date` - The Date object representing the current cell's date
|
|
16
|
+
* - `cellContext` - Additional context information about the current year cell
|
|
13
17
|
*
|
|
14
18
|
* For more examples, refer to the article on [templates]({% slug templates_calendar %}).
|
|
15
19
|
*
|
|
16
20
|
* @example
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* <ng-template kendoCalendarYearCellTemplate let-context="cellContext">
|
|
24
|
-
* <span class="custom">{{context.formattedValue}}</span>
|
|
25
|
-
* </ng-template>
|
|
26
|
-
* </kendo-calendar>
|
|
27
|
-
* `
|
|
28
|
-
* })
|
|
29
|
-
* export class AppComponent {
|
|
30
|
-
* public activeView: CalendarView = 'year';
|
|
31
|
-
* }
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-calendar [activeView]="'year'">
|
|
23
|
+
* <ng-template kendoCalendarYearCellTemplate let-context="cellContext">
|
|
24
|
+
* <span class="custom">{{context.formattedValue}}</span>
|
|
25
|
+
* </ng-template>
|
|
26
|
+
* </kendo-calendar>
|
|
32
27
|
* ```
|
|
33
28
|
*/
|
|
34
29
|
export class YearCellTemplateDirective {
|
|
@@ -75,13 +75,20 @@ export class DateInputIntl {
|
|
|
75
75
|
this.dateFieldName = service.dateFieldName;
|
|
76
76
|
this.dateFormatNames = (localeId, options) => this.service.dateFormatNames(options, localeId || this.localeId);
|
|
77
77
|
const _localeData = localeData(this.localeId);
|
|
78
|
-
// Setting the `cldr` object from here could be avoided if the logic in the common package is revisited to
|
|
78
|
+
// Setting the `cldr` object from here could be avoided if the logic in the common package is revisited to
|
|
79
79
|
// directly relies on the `localeId` being set as part of the options => TBD and validated for all suites
|
|
80
80
|
this.cldr[_localeData.name] = _localeData;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Represents the [Kendo UI DateInput component for Angular](slug:overview_dateinput).
|
|
85
|
+
*
|
|
86
|
+
* ```html
|
|
87
|
+
* <kendo-dateinput/>
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* Supported children components are: {@link DateInputCustomMessagesComponent}.
|
|
85
92
|
*/
|
|
86
93
|
export class DateInputComponent {
|
|
87
94
|
cdr;
|
|
@@ -124,31 +131,36 @@ export class DateInputComponent {
|
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
/**
|
|
127
|
-
*
|
|
134
|
+
* Specifies whether to render a clear button after the input text or DateInput value has been changed.
|
|
128
135
|
* Clicking this button resets the value of the component to `null` and triggers the `valueChange` event.
|
|
129
136
|
* @default false
|
|
130
137
|
*/
|
|
131
138
|
clearButton = false;
|
|
132
139
|
/**
|
|
133
|
-
*
|
|
134
|
-
* determines whether the component is active
|
|
140
|
+
* Specifies whether the component is disabled
|
|
135
141
|
* ([see example]({% slug disabled_dateinput %})).
|
|
136
142
|
* To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_dateinput#toc-managing-the-dateinput-disabled-state-in-reactive-forms).
|
|
143
|
+
*
|
|
144
|
+
* @default false
|
|
137
145
|
*/
|
|
138
146
|
disabled = false;
|
|
139
147
|
/**
|
|
140
|
-
*
|
|
148
|
+
* Specifies the read-only state of the DateInput
|
|
141
149
|
* ([see example]({% slug readonly_dateinput %})).
|
|
142
150
|
*
|
|
143
151
|
* @default false
|
|
144
152
|
*/
|
|
145
153
|
readonly = false;
|
|
146
154
|
/**
|
|
147
|
-
*
|
|
155
|
+
* Specifies the title of the input element of the DateInput.
|
|
156
|
+
*
|
|
157
|
+
* @default ""
|
|
148
158
|
*/
|
|
149
159
|
title = "";
|
|
150
160
|
/**
|
|
151
|
-
*
|
|
161
|
+
* Specifies the `tabIndex` property of the DateInput.
|
|
162
|
+
*
|
|
163
|
+
* @default 0
|
|
152
164
|
*/
|
|
153
165
|
tabindex = 0;
|
|
154
166
|
/**
|
|
@@ -176,59 +188,17 @@ export class DateInputComponent {
|
|
|
176
188
|
* Specifies the date format that is used to display the input value
|
|
177
189
|
* ([see example]({% slug formats_dateinput %})).
|
|
178
190
|
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* - [`FormatSettings`]({% slug api_dateinputs_formatsettings %}) - To display different formats when the component is focused or blurred, provide a settings object with specified `inputFormat` and `displayFormat` values.
|
|
191
|
+
* You can provide a string if a single format is going to be used regardless whether the input is focused or blurred.
|
|
192
|
+
* Alternatively, you can provide a FormatSettings object to display different formats when the component is focused or blurred by specifying inputFormat and displayFormat values.
|
|
182
193
|
*/
|
|
183
194
|
format = DEFAULT_FORMAT;
|
|
184
195
|
/**
|
|
185
196
|
* Defines the descriptions of the format sections in the input field.
|
|
186
197
|
* For more information, refer to the article on
|
|
187
198
|
* [placeholders]({% slug placeholders_dateinput %}).
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* ```ts
|
|
191
|
-
* _@Component({
|
|
192
|
-
* selector: 'my-app',
|
|
193
|
-
* template: `
|
|
194
|
-
* <div class="row example-wrapper" [style.min-height.px]="450">
|
|
195
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
196
|
-
* <p>Full-length format description:</p>
|
|
197
|
-
* <kendo-dateinput formatPlaceholder="wide"></kendo-dateinput>
|
|
198
|
-
* </div>
|
|
199
|
-
*
|
|
200
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
201
|
-
* <p>Narrow-length format description:</p>
|
|
202
|
-
* <kendo-dateinput formatPlaceholder="narrow"></kendo-dateinput>
|
|
203
|
-
* </div>
|
|
204
|
-
*
|
|
205
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
206
|
-
* <p>Short-length format description:</p>
|
|
207
|
-
* <kendo-dateinput formatPlaceholder="short"></kendo-dateinput>
|
|
208
|
-
* </div>
|
|
209
|
-
*
|
|
210
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
211
|
-
* <p>Display defined format:</p>
|
|
212
|
-
* <kendo-dateinput format="MM/dd/yyyy" formatPlaceholder="formatPattern"></kendo-dateinput>
|
|
213
|
-
* </div>
|
|
214
|
-
*
|
|
215
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
216
|
-
* <p>Custom defined format descriptions</p>
|
|
217
|
-
* <kendo-dateinput format="G"
|
|
218
|
-
* [formatPlaceholder]="{
|
|
219
|
-
* year: 'y', month: 'M', day: 'd',
|
|
220
|
-
* hour: 'h', minute: 'm', second: 's'
|
|
221
|
-
* }"
|
|
222
|
-
* ></kendo-dateinput>
|
|
223
|
-
* </div>
|
|
224
|
-
* </div>
|
|
225
|
-
* `
|
|
226
|
-
* })
|
|
227
|
-
* export class AppComponent { }
|
|
228
|
-
* ```
|
|
229
199
|
*/
|
|
230
200
|
set formatPlaceholder(format) {
|
|
231
|
-
this._formatPlaceholder = format
|
|
201
|
+
this._formatPlaceholder = format || DEFAULT_FORMAT_PLACEHOLDER;
|
|
232
202
|
}
|
|
233
203
|
get formatPlaceholder() {
|
|
234
204
|
return this._formatPlaceholder;
|
|
@@ -237,86 +207,72 @@ export class DateInputComponent {
|
|
|
237
207
|
* Specifies the hint the DateInput displays when its value is `null`.
|
|
238
208
|
* For more information, refer to the article on
|
|
239
209
|
* [placeholders]({% slug placeholders_dateinput %}).
|
|
240
|
-
*
|
|
241
|
-
* @example
|
|
242
|
-
* ```ts
|
|
243
|
-
* _@Component({
|
|
244
|
-
* selector: 'my-app',
|
|
245
|
-
* template: `
|
|
246
|
-
* <kendo-dateinput placeholder="Enter birth date..."></kendo-dateinput>
|
|
247
|
-
* `
|
|
248
|
-
* })
|
|
249
|
-
* export class AppComponent { }
|
|
250
|
-
* ```
|
|
210
|
+
* @default null
|
|
251
211
|
*/
|
|
252
212
|
placeholder = null;
|
|
253
213
|
/**
|
|
254
214
|
* Configures the incremental steps of the DateInput.
|
|
255
215
|
* For more information, refer to the article on
|
|
256
216
|
* [incremental steps]({% slug incrementalsteps_dateinput %}).
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* ```ts
|
|
260
|
-
* _@Component({
|
|
261
|
-
* selector: 'my-app',
|
|
262
|
-
* template: `
|
|
263
|
-
* <kendo-dateinput [steps]="steps"></kendo-dateinput>
|
|
264
|
-
* `
|
|
265
|
-
* })
|
|
266
|
-
* export class AppComponent {
|
|
267
|
-
* public steps = { year: 10, month: 1, day: 5 };
|
|
268
|
-
* }
|
|
269
|
-
* ```
|
|
270
217
|
*/
|
|
271
218
|
steps = {};
|
|
272
219
|
/**
|
|
273
220
|
* Specifies the biggest date that is valid
|
|
274
221
|
* ([see example]({% slug dateranges_dateinput %})).
|
|
275
|
-
*
|
|
222
|
+
*
|
|
223
|
+
* @default 2099-12-31
|
|
276
224
|
*/
|
|
277
225
|
max = cloneDate(MAX_DATE);
|
|
278
226
|
/**
|
|
279
227
|
* Specifies the smallest date that is valid
|
|
280
228
|
* ([see example]({% slug dateranges_dateinput %})).
|
|
281
|
-
*
|
|
229
|
+
*
|
|
230
|
+
* @default 1900-1-1
|
|
282
231
|
*/
|
|
283
232
|
min = cloneDate(MIN_DATE);
|
|
284
233
|
/**
|
|
285
|
-
*
|
|
234
|
+
* Specifies whether to enforce the built-in min and max validators when validating a form.
|
|
235
|
+
* Set to `true` to enable validation for the `min` and `max` values.
|
|
286
236
|
*
|
|
287
237
|
* @default true
|
|
288
238
|
*/
|
|
289
239
|
rangeValidation = true;
|
|
290
240
|
/**
|
|
291
|
-
*
|
|
241
|
+
* Specifies if the component automatically corrects invalid date segments.
|
|
242
|
+
* When set to `true`, the component fixes invalid segments as you type.
|
|
292
243
|
*
|
|
293
244
|
* @default true
|
|
294
245
|
*/
|
|
295
246
|
autoCorrectParts = true;
|
|
296
247
|
/**
|
|
297
|
-
*
|
|
248
|
+
* Specifies if the component automatically moves to the next segment after you complete the current one.
|
|
249
|
+
* When set to `true`, focus moves to the next segment as soon as you finish typing the current segment.
|
|
298
250
|
*
|
|
299
251
|
* @default true
|
|
300
252
|
*/
|
|
301
253
|
autoSwitchParts = true;
|
|
302
254
|
/**
|
|
303
|
-
*
|
|
255
|
+
* Specifies custom keys that move focus to the next date format segment.
|
|
256
|
+
* Provide an array of strings to define which keys trigger the focus change.
|
|
304
257
|
*/
|
|
305
258
|
autoSwitchKeys = [];
|
|
306
259
|
/**
|
|
307
|
-
*
|
|
260
|
+
* Specifies if the component displays a blinking caret inside the DateInput when possible.
|
|
261
|
+
* Set to `true` to show a blinking caret for better visual feedback.
|
|
308
262
|
*
|
|
309
263
|
* @default false
|
|
310
264
|
*/
|
|
311
265
|
allowCaretMode = false;
|
|
312
266
|
/**
|
|
313
|
-
*
|
|
267
|
+
* Specifies whether to autofill the rest of the date to the current date when the component loses focus.
|
|
314
268
|
*
|
|
315
269
|
* @default false
|
|
316
270
|
*/
|
|
317
271
|
autoFill = false;
|
|
318
272
|
/**
|
|
319
|
-
*
|
|
273
|
+
* Specifies whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
274
|
+
*
|
|
275
|
+
* @default false
|
|
320
276
|
*/
|
|
321
277
|
incompleteDateValidation = false;
|
|
322
278
|
/**
|
|
@@ -325,6 +281,7 @@ export class DateInputComponent {
|
|
|
325
281
|
*
|
|
326
282
|
* The default value is 68, indicating that typing any value less than 69
|
|
327
283
|
* will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
|
|
284
|
+
* @default 68
|
|
328
285
|
*/
|
|
329
286
|
twoDigitYearMax = TWO_DIGIT_YEAR_MAX;
|
|
330
287
|
/**
|
|
@@ -336,7 +293,7 @@ export class DateInputComponent {
|
|
|
336
293
|
/**
|
|
337
294
|
* Specifies the value of the DateInput component.
|
|
338
295
|
*
|
|
339
|
-
*
|
|
296
|
+
* The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance or `null`.
|
|
340
297
|
*/
|
|
341
298
|
set value(value) {
|
|
342
299
|
this.verifyValue(value);
|
|
@@ -351,6 +308,8 @@ export class DateInputComponent {
|
|
|
351
308
|
* Specifies whether the **Up** and **Down** spin buttons will be rendered.
|
|
352
309
|
* For more information, refer to the article on
|
|
353
310
|
* [spinner buttons]({% slug spinbuttons_dateinput %}).
|
|
311
|
+
*
|
|
312
|
+
* @default false
|
|
354
313
|
*/
|
|
355
314
|
spinners = false;
|
|
356
315
|
/**
|
|
@@ -362,18 +321,14 @@ export class DateInputComponent {
|
|
|
362
321
|
*/
|
|
363
322
|
hasPopup;
|
|
364
323
|
/**
|
|
365
|
-
*
|
|
324
|
+
* Specifies the size of the component.
|
|
366
325
|
*
|
|
367
|
-
*
|
|
368
|
-
* * `small`
|
|
369
|
-
* * `medium` (Default)
|
|
370
|
-
* * `large`
|
|
371
|
-
* * `none`
|
|
326
|
+
* @default medium
|
|
372
327
|
*
|
|
373
328
|
*/
|
|
374
329
|
set size(size) {
|
|
375
330
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
376
|
-
const newSize = size
|
|
331
|
+
const newSize = size || DEFAULT_SIZE;
|
|
377
332
|
if (newSize !== 'none') {
|
|
378
333
|
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', newSize));
|
|
379
334
|
}
|
|
@@ -383,19 +338,12 @@ export class DateInputComponent {
|
|
|
383
338
|
return this._size;
|
|
384
339
|
}
|
|
385
340
|
/**
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* The possible values are:
|
|
389
|
-
* * `small`
|
|
390
|
-
* * `medium` (Default)
|
|
391
|
-
* * `large`
|
|
392
|
-
* * `full`
|
|
393
|
-
* * `none`
|
|
394
|
-
*
|
|
341
|
+
* Specifies the border radius of the component.
|
|
342
|
+
* @default 'medium'
|
|
395
343
|
*/
|
|
396
344
|
set rounded(rounded) {
|
|
397
345
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
398
|
-
const newRounded = rounded
|
|
346
|
+
const newRounded = rounded || DEFAULT_ROUNDED;
|
|
399
347
|
if (newRounded !== 'none') {
|
|
400
348
|
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
401
349
|
}
|
|
@@ -405,18 +353,12 @@ export class DateInputComponent {
|
|
|
405
353
|
return this._rounded;
|
|
406
354
|
}
|
|
407
355
|
/**
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
* The possible values are:
|
|
411
|
-
* * `solid` (Default)
|
|
412
|
-
* * `flat`
|
|
413
|
-
* * `outline`
|
|
414
|
-
* * `none`
|
|
415
|
-
*
|
|
356
|
+
* Specifies the fillMode of the component.
|
|
357
|
+
* @default 'solid'
|
|
416
358
|
*/
|
|
417
359
|
set fillMode(fillMode) {
|
|
418
360
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
419
|
-
const newFillMode = fillMode
|
|
361
|
+
const newFillMode = fillMode || DEFAULT_FILL_MODE;
|
|
420
362
|
if (newFillMode !== 'none') {
|
|
421
363
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', newFillMode));
|
|
422
364
|
if (this.spinners && this.spinup && this.spindown) {
|
|
@@ -430,7 +372,7 @@ export class DateInputComponent {
|
|
|
430
372
|
return this._fillMode;
|
|
431
373
|
}
|
|
432
374
|
/**
|
|
433
|
-
*
|
|
375
|
+
* Specifies the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
|
|
434
376
|
*/
|
|
435
377
|
set inputAttributes(attributes) {
|
|
436
378
|
if (isObjectPresent(this.parsedAttributes)) {
|
|
@@ -805,20 +747,9 @@ export class DateInputComponent {
|
|
|
805
747
|
/**
|
|
806
748
|
* Focuses the DateInput component.
|
|
807
749
|
*
|
|
808
|
-
* @example
|
|
809
|
-
* ```ts
|
|
810
|
-
* _@Component({
|
|
811
|
-
* selector: 'my-app',
|
|
812
|
-
* template: `
|
|
813
|
-
* <button (click)="dateinput.focus()">Focus date input</button>
|
|
814
|
-
* <kendo-dateinput #dateinput></kendo-dateinput>
|
|
815
|
-
* `
|
|
816
|
-
* })
|
|
817
|
-
* export class AppComponent { }
|
|
818
|
-
* ```
|
|
819
750
|
*/
|
|
820
751
|
focus() {
|
|
821
|
-
this.kendoDate
|
|
752
|
+
this.kendoDate?.focus();
|
|
822
753
|
}
|
|
823
754
|
/**
|
|
824
755
|
* Blurs the DateInput component.
|
|
@@ -952,7 +883,7 @@ export class DateInputComponent {
|
|
|
952
883
|
}
|
|
953
884
|
}
|
|
954
885
|
setInputAttributes() {
|
|
955
|
-
const attributesToRender =
|
|
886
|
+
const attributesToRender = { ...this.mutableAttributes, ...this.parsedAttributes };
|
|
956
887
|
setHTMLAttributes(attributesToRender, this.renderer, this.dateInput.nativeElement, this.ngZone);
|
|
957
888
|
}
|
|
958
889
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.IntlService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Injector }, { token: i2.LocalizationService }, { token: i3.PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -10,8 +10,21 @@ import * as i1 from "./localization/dateinput-custom-messages.component";
|
|
|
10
10
|
import * as i2 from "./dateinput.component";
|
|
11
11
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Required for adding all DateInput features in NgModule-based Angular applications.
|
|
14
|
+
*
|
|
15
|
+
* The package exports:
|
|
16
|
+
* - `DateInputComponent`—The DateInput component.
|
|
17
|
+
* - `DateInputMessagesComponent`—The DateInput custom messages component.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { DateInputModule } from '@progress/kendo-angular-dateinputs';
|
|
22
|
+
*
|
|
23
|
+
* @NgModule({
|
|
24
|
+
* imports: [DateInputModule]
|
|
25
|
+
* })
|
|
26
|
+
* export class AppModule { }
|
|
27
|
+
* ```
|
|
15
28
|
*/
|
|
16
29
|
export class DateInputModule {
|
|
17
30
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -8,7 +8,24 @@ import { DateInputMessages } from './messages';
|
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Represents the Kendo UI DateInput custom messages component.
|
|
12
|
+
* Overrides the default component messages with custom messages ([see example]({% slug globalization_dateinputs %}#toc-custom-messages)).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* @Component({
|
|
17
|
+
* selector: 'my-app',
|
|
18
|
+
* template: `
|
|
19
|
+
* <kendo-dateinput>
|
|
20
|
+
* <kendo-dateinput-messages
|
|
21
|
+
* increment="Increase value"
|
|
22
|
+
* decrement="Decrease value">
|
|
23
|
+
* </kendo-dateinput-messages>
|
|
24
|
+
* </kendo-dateinput>
|
|
25
|
+
* `
|
|
26
|
+
* })
|
|
27
|
+
* export class AppComponent { }
|
|
28
|
+
* ```
|
|
12
29
|
*/
|
|
13
30
|
export class DateInputCustomMessagesComponent extends DateInputMessages {
|
|
14
31
|
service;
|