@progress/kendo-angular-dateinputs 19.1.2-develop.3 → 19.1.2-develop.4
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 +37 -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 +46 -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/dateinput/dateinput.component.d.ts +43 -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 +65 -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 +22 -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 +26 -27
- package/daterange/date-range.component.d.ts +1 -6
- package/daterange/date-range.service.d.ts +27 -27
- package/datetimepicker/datetimepicker.component.d.ts +88 -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 +37 -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 +46 -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 +44 -120
- 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 +65 -127
- 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 +22 -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 +26 -27
- package/esm2022/daterange/date-range.component.mjs +1 -6
- package/esm2022/daterange/date-range.service.mjs +27 -27
- package/esm2022/datetimepicker/datetimepicker.component.mjs +88 -79
- 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 +54 -119
- package/esm2022/timepicker/timepicker.module.mjs +13 -2
- package/esm2022/timepicker/timeselector.component.mjs +24 -40
- package/fesm2022/progress-kendo-angular-dateinputs.mjs +870 -1003
- package/package.json +13 -12
- 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 +50 -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,7 +75,7 @@ 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
|
}
|
|
@@ -124,31 +124,36 @@ export class DateInputComponent {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Specifies whether to render a clear button after the input text or DateInput value has been changed.
|
|
128
128
|
* Clicking this button resets the value of the component to `null` and triggers the `valueChange` event.
|
|
129
129
|
* @default false
|
|
130
130
|
*/
|
|
131
131
|
clearButton = false;
|
|
132
132
|
/**
|
|
133
|
-
*
|
|
134
|
-
* determines whether the component is active
|
|
133
|
+
* Specifies whether the component is disabled
|
|
135
134
|
* ([see example]({% slug disabled_dateinput %})).
|
|
136
135
|
* 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).
|
|
136
|
+
*
|
|
137
|
+
* @default false
|
|
137
138
|
*/
|
|
138
139
|
disabled = false;
|
|
139
140
|
/**
|
|
140
|
-
*
|
|
141
|
+
* Specifies the read-only state of the DateInput
|
|
141
142
|
* ([see example]({% slug readonly_dateinput %})).
|
|
142
143
|
*
|
|
143
144
|
* @default false
|
|
144
145
|
*/
|
|
145
146
|
readonly = false;
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Specifies the title of the input element of the DateInput.
|
|
149
|
+
*
|
|
150
|
+
* @default ""
|
|
148
151
|
*/
|
|
149
152
|
title = "";
|
|
150
153
|
/**
|
|
151
|
-
*
|
|
154
|
+
* Specifies the `tabIndex` property of the DateInput.
|
|
155
|
+
*
|
|
156
|
+
* @default 0
|
|
152
157
|
*/
|
|
153
158
|
tabindex = 0;
|
|
154
159
|
/**
|
|
@@ -176,56 +181,14 @@ export class DateInputComponent {
|
|
|
176
181
|
* Specifies the date format that is used to display the input value
|
|
177
182
|
* ([see example]({% slug formats_dateinput %})).
|
|
178
183
|
*
|
|
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.
|
|
184
|
+
* You can provide a string if a single format is going to be used regardless whether the input is focused or blurred.
|
|
185
|
+
* 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
186
|
*/
|
|
183
187
|
format = DEFAULT_FORMAT;
|
|
184
188
|
/**
|
|
185
189
|
* Defines the descriptions of the format sections in the input field.
|
|
186
190
|
* For more information, refer to the article on
|
|
187
191
|
* [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
192
|
*/
|
|
230
193
|
set formatPlaceholder(format) {
|
|
231
194
|
this._formatPlaceholder = format ? format : DEFAULT_FORMAT_PLACEHOLDER;
|
|
@@ -237,86 +200,72 @@ export class DateInputComponent {
|
|
|
237
200
|
* Specifies the hint the DateInput displays when its value is `null`.
|
|
238
201
|
* For more information, refer to the article on
|
|
239
202
|
* [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
|
-
* ```
|
|
203
|
+
* @default null
|
|
251
204
|
*/
|
|
252
205
|
placeholder = null;
|
|
253
206
|
/**
|
|
254
207
|
* Configures the incremental steps of the DateInput.
|
|
255
208
|
* For more information, refer to the article on
|
|
256
209
|
* [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
210
|
*/
|
|
271
211
|
steps = {};
|
|
272
212
|
/**
|
|
273
213
|
* Specifies the biggest date that is valid
|
|
274
214
|
* ([see example]({% slug dateranges_dateinput %})).
|
|
275
|
-
*
|
|
215
|
+
*
|
|
216
|
+
* @default 2099-12-31
|
|
276
217
|
*/
|
|
277
218
|
max = cloneDate(MAX_DATE);
|
|
278
219
|
/**
|
|
279
220
|
* Specifies the smallest date that is valid
|
|
280
221
|
* ([see example]({% slug dateranges_dateinput %})).
|
|
281
|
-
*
|
|
222
|
+
*
|
|
223
|
+
* @default 1900-1-1
|
|
282
224
|
*/
|
|
283
225
|
min = cloneDate(MIN_DATE);
|
|
284
226
|
/**
|
|
285
|
-
*
|
|
227
|
+
* Specifies whether to enforce the built-in min and max validators when validating a form.
|
|
228
|
+
* Set to `true` to enable validation for the `min` and `max` values.
|
|
286
229
|
*
|
|
287
230
|
* @default true
|
|
288
231
|
*/
|
|
289
232
|
rangeValidation = true;
|
|
290
233
|
/**
|
|
291
|
-
*
|
|
234
|
+
* Specifies if the component automatically corrects invalid date segments.
|
|
235
|
+
* When set to `true`, the component fixes invalid segments as you type.
|
|
292
236
|
*
|
|
293
237
|
* @default true
|
|
294
238
|
*/
|
|
295
239
|
autoCorrectParts = true;
|
|
296
240
|
/**
|
|
297
|
-
*
|
|
241
|
+
* Specifies if the component automatically moves to the next segment after you complete the current one.
|
|
242
|
+
* When set to `true`, focus moves to the next segment as soon as you finish typing the current segment.
|
|
298
243
|
*
|
|
299
244
|
* @default true
|
|
300
245
|
*/
|
|
301
246
|
autoSwitchParts = true;
|
|
302
247
|
/**
|
|
303
|
-
*
|
|
248
|
+
* Specifies custom keys that move focus to the next date format segment.
|
|
249
|
+
* Provide an array of strings to define which keys trigger the focus change.
|
|
304
250
|
*/
|
|
305
251
|
autoSwitchKeys = [];
|
|
306
252
|
/**
|
|
307
|
-
*
|
|
253
|
+
* Specifies if the component displays a blinking caret inside the DateInput when possible.
|
|
254
|
+
* Set to `true` to show a blinking caret for better visual feedback.
|
|
308
255
|
*
|
|
309
256
|
* @default false
|
|
310
257
|
*/
|
|
311
258
|
allowCaretMode = false;
|
|
312
259
|
/**
|
|
313
|
-
*
|
|
260
|
+
* Specifies whether to autofill the rest of the date to the current date when the component loses focus.
|
|
314
261
|
*
|
|
315
262
|
* @default false
|
|
316
263
|
*/
|
|
317
264
|
autoFill = false;
|
|
318
265
|
/**
|
|
319
|
-
*
|
|
266
|
+
* Specifies whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
267
|
+
*
|
|
268
|
+
* @default false
|
|
320
269
|
*/
|
|
321
270
|
incompleteDateValidation = false;
|
|
322
271
|
/**
|
|
@@ -325,6 +274,7 @@ export class DateInputComponent {
|
|
|
325
274
|
*
|
|
326
275
|
* The default value is 68, indicating that typing any value less than 69
|
|
327
276
|
* will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
|
|
277
|
+
* @default 68
|
|
328
278
|
*/
|
|
329
279
|
twoDigitYearMax = TWO_DIGIT_YEAR_MAX;
|
|
330
280
|
/**
|
|
@@ -336,7 +286,7 @@ export class DateInputComponent {
|
|
|
336
286
|
/**
|
|
337
287
|
* Specifies the value of the DateInput component.
|
|
338
288
|
*
|
|
339
|
-
*
|
|
289
|
+
* 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
290
|
*/
|
|
341
291
|
set value(value) {
|
|
342
292
|
this.verifyValue(value);
|
|
@@ -351,6 +301,8 @@ export class DateInputComponent {
|
|
|
351
301
|
* Specifies whether the **Up** and **Down** spin buttons will be rendered.
|
|
352
302
|
* For more information, refer to the article on
|
|
353
303
|
* [spinner buttons]({% slug spinbuttons_dateinput %}).
|
|
304
|
+
*
|
|
305
|
+
* @default false
|
|
354
306
|
*/
|
|
355
307
|
spinners = false;
|
|
356
308
|
/**
|
|
@@ -362,13 +314,9 @@ export class DateInputComponent {
|
|
|
362
314
|
*/
|
|
363
315
|
hasPopup;
|
|
364
316
|
/**
|
|
365
|
-
*
|
|
317
|
+
* Specifies the size of the component.
|
|
366
318
|
*
|
|
367
|
-
*
|
|
368
|
-
* * `small`
|
|
369
|
-
* * `medium` (Default)
|
|
370
|
-
* * `large`
|
|
371
|
-
* * `none`
|
|
319
|
+
* @default medium
|
|
372
320
|
*
|
|
373
321
|
*/
|
|
374
322
|
set size(size) {
|
|
@@ -383,15 +331,8 @@ export class DateInputComponent {
|
|
|
383
331
|
return this._size;
|
|
384
332
|
}
|
|
385
333
|
/**
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
* The possible values are:
|
|
389
|
-
* * `small`
|
|
390
|
-
* * `medium` (Default)
|
|
391
|
-
* * `large`
|
|
392
|
-
* * `full`
|
|
393
|
-
* * `none`
|
|
394
|
-
*
|
|
334
|
+
* Specifies the border radius of the component.
|
|
335
|
+
* @default 'medium'
|
|
395
336
|
*/
|
|
396
337
|
set rounded(rounded) {
|
|
397
338
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
@@ -405,14 +346,8 @@ export class DateInputComponent {
|
|
|
405
346
|
return this._rounded;
|
|
406
347
|
}
|
|
407
348
|
/**
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
* The possible values are:
|
|
411
|
-
* * `solid` (Default)
|
|
412
|
-
* * `flat`
|
|
413
|
-
* * `outline`
|
|
414
|
-
* * `none`
|
|
415
|
-
*
|
|
349
|
+
* Specifies the fillMode of the component.
|
|
350
|
+
* @default 'solid'
|
|
416
351
|
*/
|
|
417
352
|
set fillMode(fillMode) {
|
|
418
353
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
@@ -430,7 +365,7 @@ export class DateInputComponent {
|
|
|
430
365
|
return this._fillMode;
|
|
431
366
|
}
|
|
432
367
|
/**
|
|
433
|
-
*
|
|
368
|
+
* Specifies the HTML attributes of the inner focusable input element. Attributes which are essential for certain component functionalities cannot be changed.
|
|
434
369
|
*/
|
|
435
370
|
set inputAttributes(attributes) {
|
|
436
371
|
if (isObjectPresent(this.parsedAttributes)) {
|
|
@@ -805,17 +740,6 @@ export class DateInputComponent {
|
|
|
805
740
|
/**
|
|
806
741
|
* Focuses the DateInput component.
|
|
807
742
|
*
|
|
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
743
|
*/
|
|
820
744
|
focus() {
|
|
821
745
|
this.kendoDate && this.kendoDate.focus();
|
|
@@ -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;
|