@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
|
@@ -56,7 +56,23 @@ const VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/date
|
|
|
56
56
|
const DEFAULT_FORMAT = 'd';
|
|
57
57
|
const TWO_DIGIT_YEAR_MAX = 68;
|
|
58
58
|
/**
|
|
59
|
-
* Represents the
|
|
59
|
+
* Represents the Kendo UI DatePicker component for Angular.
|
|
60
|
+
* Provides a user-friendly way to select dates with a calendar popup ([see example](slug:overview_datepicker)).
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* @Component({
|
|
65
|
+
* selector: 'my-app',
|
|
66
|
+
* template: `
|
|
67
|
+
* <kendo-datepicker
|
|
68
|
+
* [value]="selectedDate"
|
|
69
|
+
* </kendo-datepicker>
|
|
70
|
+
* `
|
|
71
|
+
* })
|
|
72
|
+
* export class AppComponent {
|
|
73
|
+
* selectedDate = new Date();
|
|
74
|
+
* }
|
|
75
|
+
* ```
|
|
60
76
|
*/
|
|
61
77
|
export class DatePickerComponent extends MultiTabStop {
|
|
62
78
|
zone;
|
|
@@ -92,13 +108,14 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
92
108
|
this.cellTemplate = template;
|
|
93
109
|
}
|
|
94
110
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
111
|
+
* Renders a clear button when set to `true` after the input text or DatePicker value changes.
|
|
112
|
+
* Click this button to reset the component value to `null` and trigger the `valueChange` event.
|
|
97
113
|
* @default false
|
|
98
114
|
*/
|
|
99
115
|
clearButton = false;
|
|
100
116
|
/**
|
|
101
|
-
*
|
|
117
|
+
* Specifies the HTML attributes of the inner focusable input element.
|
|
118
|
+
* You cannot change attributes that are essential for certain component functionalities.
|
|
102
119
|
*/
|
|
103
120
|
inputAttributes;
|
|
104
121
|
/**
|
|
@@ -182,7 +199,7 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
182
199
|
this.footerTemplate = template;
|
|
183
200
|
}
|
|
184
201
|
/**
|
|
185
|
-
*
|
|
202
|
+
* Controls the visibility of the Calendar footer.
|
|
186
203
|
* @default false
|
|
187
204
|
*/
|
|
188
205
|
footer = false;
|
|
@@ -197,62 +214,53 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
197
214
|
this.navigationItemTemplate = template;
|
|
198
215
|
}
|
|
199
216
|
/**
|
|
200
|
-
*
|
|
217
|
+
* Specifies the format of the displayed Calendar week days' names.
|
|
201
218
|
* @default 'short'
|
|
202
219
|
*/
|
|
203
220
|
weekDaysFormat = "short";
|
|
204
221
|
/**
|
|
205
|
-
*
|
|
206
|
-
* The default
|
|
207
|
-
* - `infinite` - false
|
|
208
|
-
* - `classic` - true
|
|
222
|
+
* Shows the days that fall outside the current month in the Calendar ([see example]({% slug viewoptions_calendar %}#toc-displaying-other-month-days)).
|
|
223
|
+
* The default value is `false` for infinite Calendar type and `true` for classic Calendar type.
|
|
209
224
|
*/
|
|
210
225
|
showOtherMonthDays;
|
|
211
226
|
/**
|
|
212
|
-
*
|
|
213
|
-
* ([see example]({% slug viewoptions_calendar %}#toc-active-view)).
|
|
214
|
-
* By default, the active view is `month`.
|
|
227
|
+
* Specifies the active view that the Calendar initially renders ([see example]({% slug viewoptions_calendar %}#toc-active-view)).
|
|
215
228
|
*
|
|
216
|
-
*
|
|
229
|
+
* You have to set `activeView` within the `topView`-`bottomView` range.
|
|
230
|
+
* @default 'month'
|
|
217
231
|
*/
|
|
218
232
|
activeView = CalendarViewEnum[CalendarViewEnum.month];
|
|
219
233
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
234
|
+
* Specifies the bottommost Calendar view to which you can navigate ([see example](slug:datepicker_calendar_options#toc-view-selection-depth)).
|
|
235
|
+
* @default 'month'
|
|
222
236
|
*/
|
|
223
237
|
bottomView = CalendarViewEnum[CalendarViewEnum.month];
|
|
224
238
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
239
|
+
* Specifies the topmost Calendar view to which you can navigate ([see example](slug:datepicker_calendar_options#toc-view-selection-depth)).
|
|
240
|
+
* @default 'century'
|
|
227
241
|
*/
|
|
228
242
|
topView = CalendarViewEnum[CalendarViewEnum.century];
|
|
229
243
|
/**
|
|
230
244
|
* Specifies the Calendar type.
|
|
231
|
-
*
|
|
232
|
-
* The possible values are:
|
|
233
|
-
* - `infinite` (default)
|
|
234
|
-
* - `classic`
|
|
235
|
-
*
|
|
245
|
+
* @default 'infinite'
|
|
236
246
|
*/
|
|
237
247
|
calendarType = 'infinite';
|
|
238
248
|
/**
|
|
239
249
|
* Determines whether to enable animation when navigating to previous/next Calendar view.
|
|
240
250
|
* Applies to the [`classic`]({% slug api_dateinputs_datepickercomponent %}#toc-calendartype) Calendar only.
|
|
241
251
|
*
|
|
242
|
-
*
|
|
252
|
+
* This feature uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). In order to run the animation in browsers that do not support it, you need the `web-animations-js` polyfill.
|
|
243
253
|
*
|
|
244
254
|
* @default false
|
|
245
255
|
*/
|
|
246
256
|
animateCalendarNavigation = false;
|
|
247
257
|
/**
|
|
248
|
-
*
|
|
249
|
-
* ([see example]({% slug disabled_datepicker %})).
|
|
258
|
+
* Specifies or gets the `disabled` property of the DatePicker and determines whether the component is active ([see example]({% slug disabled_datepicker %})).
|
|
250
259
|
* To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_datepicker#toc-managing-the-datepicker-disabled-state-in-reactive-forms).
|
|
251
260
|
*/
|
|
252
261
|
disabled = false;
|
|
253
262
|
/**
|
|
254
|
-
*
|
|
255
|
-
* ([see example]({% slug readonly_datepicker %}#toc-read-only-datepicker)).
|
|
263
|
+
* Specifies the read-only state of the DatePicker ([see example]({% slug readonly_datepicker %}#toc-read-only-datepicker)).
|
|
256
264
|
*
|
|
257
265
|
* @default false
|
|
258
266
|
*/
|
|
@@ -261,17 +269,16 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
261
269
|
* Sets the read-only state of the DatePicker input field
|
|
262
270
|
* ([see example]({% slug readonly_datepicker %}#toc-read-only-input)).
|
|
263
271
|
*
|
|
264
|
-
*
|
|
272
|
+
* If you set the [`readonly`]({% slug api_dateinputs_datepickercomponent %}#toc-readonly) property value to `true`,
|
|
265
273
|
* the input will be rendered in a read-only state regardless of the `readOnlyInput` value.
|
|
266
274
|
*/
|
|
267
275
|
readOnlyInput = false;
|
|
268
276
|
/**
|
|
269
277
|
* Configures the popup options of the DatePicker.
|
|
270
278
|
*
|
|
271
|
-
* The available options are
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
* - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
|
|
279
|
+
* The available options are animate which controls the popup animation and by default, the open and close animations are enabled.
|
|
280
|
+
* The appendTo option controls the popup container and by default, the popup will be appended to the root component.
|
|
281
|
+
* The popupClass option specifies a list of CSS classes that are used to style the popup.
|
|
275
282
|
*/
|
|
276
283
|
set popupSettings(settings) {
|
|
277
284
|
this._popupSettings = Object.assign({}, { animate: true }, settings);
|
|
@@ -297,17 +304,18 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
297
304
|
/**
|
|
298
305
|
* Specifies the smallest valid date
|
|
299
306
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
300
|
-
*
|
|
307
|
+
* @default 1900-1-1
|
|
301
308
|
*/
|
|
302
309
|
min = cloneDate(MIN_DATE);
|
|
303
310
|
/**
|
|
304
311
|
* Specifies the biggest valid date
|
|
305
312
|
* ([see example]({% slug dateranges_datepicker %})).
|
|
306
|
-
*
|
|
313
|
+
* @default 2099-12-31
|
|
307
314
|
*/
|
|
308
315
|
max = cloneDate(MAX_DATE);
|
|
309
316
|
/**
|
|
310
317
|
* Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
318
|
+
* @default false
|
|
311
319
|
*/
|
|
312
320
|
incompleteDateValidation = false;
|
|
313
321
|
/**
|
|
@@ -347,13 +355,13 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
347
355
|
/**
|
|
348
356
|
* Specifies the focused date of the Calendar component
|
|
349
357
|
* ([see example](slug:datepicker_calendar_options#toc-focused-dates)).
|
|
358
|
+
* @default null
|
|
350
359
|
*/
|
|
351
360
|
focusedDate = null;
|
|
352
361
|
/**
|
|
353
362
|
* Specifies the value of the DatePicker component.
|
|
354
363
|
*
|
|
355
|
-
*
|
|
356
|
-
* [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance or `null`.
|
|
364
|
+
* The `value` has to be a valid [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) instance or `null`.
|
|
357
365
|
*/
|
|
358
366
|
set value(value) {
|
|
359
367
|
this.verifyValue(value);
|
|
@@ -366,9 +374,8 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
366
374
|
* Specifies the date format that is used to display the input value
|
|
367
375
|
* ([see example]({% slug formats_datepicker %})).
|
|
368
376
|
*
|
|
369
|
-
* Format value options
|
|
370
|
-
*
|
|
371
|
-
* - [`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.
|
|
377
|
+
* Format value options include string to provide a single format that is used regardless whether the input is focused or blurred.
|
|
378
|
+
* 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.
|
|
372
379
|
*/
|
|
373
380
|
format = DEFAULT_FORMAT;
|
|
374
381
|
/**
|
|
@@ -377,69 +384,25 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
377
384
|
*
|
|
378
385
|
* The default value is 68, indicating that typing any value less than 69
|
|
379
386
|
* will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.
|
|
387
|
+
* @default 68
|
|
380
388
|
*/
|
|
381
389
|
twoDigitYearMax = TWO_DIGIT_YEAR_MAX;
|
|
382
390
|
/**
|
|
383
391
|
* Defines the descriptions of the format sections in the input field.
|
|
384
392
|
* ([more information and examples]({% slug placeholders_datepicker %})).
|
|
385
393
|
*
|
|
386
|
-
* @example
|
|
387
|
-
* ```ts
|
|
388
|
-
* _@Component({
|
|
389
|
-
* selector: 'my-app',
|
|
390
|
-
* template: `
|
|
391
|
-
* <div class="row example-wrapper" [style.min-height.px]="450">
|
|
392
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
393
|
-
* <p>Full-length format description:</p>
|
|
394
|
-
* <kendo-datepicker formatPlaceholder="wide"></kendo-datepicker>
|
|
395
|
-
* </div>
|
|
396
|
-
*
|
|
397
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
398
|
-
* <p>Narrow-length format description:</p>
|
|
399
|
-
* <kendo-datepicker formatPlaceholder="narrow"></kendo-datepicker>
|
|
400
|
-
* </div>
|
|
401
|
-
*
|
|
402
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
403
|
-
* <p>Short-length format description:</p>
|
|
404
|
-
* <kendo-datepicker formatPlaceholder="short"></kendo-datepicker>
|
|
405
|
-
* </div>
|
|
406
|
-
*
|
|
407
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
408
|
-
* <p>Display defined format:</p>
|
|
409
|
-
* <kendo-datepicker format="MM/dd/yyyy" formatPlaceholder="formatPattern"></kendo-datepicker>
|
|
410
|
-
* </div>
|
|
411
|
-
*
|
|
412
|
-
* <div class="col-xs-12 col-md-6 example-col">
|
|
413
|
-
* <p>Custom defined format descriptions</p>
|
|
414
|
-
* <kendo-datepicker format="MM/dd/yyyy"
|
|
415
|
-
* [formatPlaceholder]="{ year: 'y', month: 'M', day: 'd' }"
|
|
416
|
-
* ></kendo-datepicker>
|
|
417
|
-
* </div>
|
|
418
|
-
* </div>
|
|
419
|
-
* `
|
|
420
|
-
* })
|
|
421
|
-
* export class AppComponent { }
|
|
422
|
-
* ```
|
|
423
394
|
*/
|
|
424
395
|
formatPlaceholder;
|
|
425
396
|
/**
|
|
426
397
|
* Specifies the hint the DatePicker displays when its value is `null`.
|
|
427
398
|
* ([more information and exaples]({% slug placeholders_datepicker %})).
|
|
428
|
-
*
|
|
429
|
-
* @example
|
|
430
|
-
* ```ts
|
|
431
|
-
* _@Component({
|
|
432
|
-
* selector: 'my-app',
|
|
433
|
-
* template: `
|
|
434
|
-
* <kendo-datepicker placeholder="Enter birth date..."></kendo-datepicker>
|
|
435
|
-
* `
|
|
436
|
-
* })
|
|
437
|
-
* export class AppComponent { }
|
|
438
|
-
* ```
|
|
399
|
+
* @default null
|
|
439
400
|
*/
|
|
440
401
|
placeholder = null;
|
|
441
402
|
/**
|
|
442
|
-
* Sets
|
|
403
|
+
* Sets the `tabindex` of the DatePicker.
|
|
404
|
+
* This property is used to set the order in which the DatePicker will receive focus when navigating through the page using the Tab key.
|
|
405
|
+
* @default 0
|
|
443
406
|
*/
|
|
444
407
|
tabindex = 0;
|
|
445
408
|
/**
|
|
@@ -465,11 +428,13 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
465
428
|
/**
|
|
466
429
|
* Sets the title of the input element of the DatePicker and the title text rendered
|
|
467
430
|
* in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
|
|
431
|
+
* @default ""
|
|
468
432
|
*/
|
|
469
433
|
adaptiveTitle = "";
|
|
470
434
|
/**
|
|
471
435
|
* Sets the subtitle text rendered in the header of the popup(action sheet).
|
|
472
436
|
* Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
|
|
437
|
+
* @default ""
|
|
473
438
|
*/
|
|
474
439
|
adaptiveSubtitle = "";
|
|
475
440
|
/**
|
|
@@ -482,22 +447,18 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
482
447
|
* Determines whether the built-in validator for disabled
|
|
483
448
|
* date ranges is enforced when validating a form
|
|
484
449
|
* ([see example]( slug:disabled_dates_datepicker#toc-using-a-function)).
|
|
450
|
+
* @default true
|
|
485
451
|
*/
|
|
486
452
|
disabledDatesValidation = true;
|
|
487
453
|
/**
|
|
488
454
|
* Determines whether to display a week number column in the `month` view of the Calendar
|
|
489
455
|
* ([see example](slug:datepicker_calendar_options#toc-week-number-column)).
|
|
456
|
+
* @default false
|
|
490
457
|
*/
|
|
491
458
|
weekNumber = false;
|
|
492
459
|
/**
|
|
493
460
|
* Sets the size of the component.
|
|
494
|
-
*
|
|
495
|
-
* The possible values are:
|
|
496
|
-
* * `small`
|
|
497
|
-
* * `medium` (Default)
|
|
498
|
-
* * `large`
|
|
499
|
-
* * `none`
|
|
500
|
-
*
|
|
461
|
+
* @default 'medium'
|
|
501
462
|
*/
|
|
502
463
|
set size(size) {
|
|
503
464
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
@@ -513,15 +474,8 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
513
474
|
return this._size;
|
|
514
475
|
}
|
|
515
476
|
/**
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
* The possible values are:
|
|
519
|
-
* * `small`
|
|
520
|
-
* * `medium` (Default)
|
|
521
|
-
* * `large`
|
|
522
|
-
* * `full`
|
|
523
|
-
* * `none`
|
|
524
|
-
*
|
|
477
|
+
* Specifies the border radius of the component.
|
|
478
|
+
* @default 'medium'
|
|
525
479
|
*/
|
|
526
480
|
set rounded(rounded) {
|
|
527
481
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
@@ -535,14 +489,8 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
535
489
|
return this._rounded;
|
|
536
490
|
}
|
|
537
491
|
/**
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
* The possible values are:
|
|
541
|
-
* * `solid` (Default)
|
|
542
|
-
* * `flat`
|
|
543
|
-
* * `outline`
|
|
544
|
-
* * `none`
|
|
545
|
-
*
|
|
492
|
+
* Specifies the fillMode of the component.
|
|
493
|
+
* @default 'solid'
|
|
546
494
|
*/
|
|
547
495
|
set fillMode(fillMode) {
|
|
548
496
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
@@ -560,7 +508,9 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
560
508
|
return this._fillMode;
|
|
561
509
|
}
|
|
562
510
|
/**
|
|
563
|
-
*
|
|
511
|
+
* 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.
|
|
512
|
+
*
|
|
513
|
+
* @default 'none'
|
|
564
514
|
*/
|
|
565
515
|
adaptiveMode = 'none';
|
|
566
516
|
/**
|
|
@@ -833,18 +783,6 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
833
783
|
}
|
|
834
784
|
/**
|
|
835
785
|
* Focuses the DatePicker component.
|
|
836
|
-
*
|
|
837
|
-
* @example
|
|
838
|
-
* ```ts
|
|
839
|
-
* _@Component({
|
|
840
|
-
* selector: 'my-app',
|
|
841
|
-
* template: `
|
|
842
|
-
* <button (click)="datepicker.focus()">Focus date picker</button>
|
|
843
|
-
* <kendo-datepicker #datepicker></kendo-datepicker>
|
|
844
|
-
* `
|
|
845
|
-
* })
|
|
846
|
-
* export class AppComponent { }
|
|
847
|
-
* ```
|
|
848
786
|
*/
|
|
849
787
|
focus() {
|
|
850
788
|
this.dateInput.focus();
|
|
@@ -860,7 +798,7 @@ export class DatePickerComponent extends MultiTabStop {
|
|
|
860
798
|
* If you use the `toggle` method to show or hide the popup or actionSheet,
|
|
861
799
|
* the `open` and `close` events do not fire.
|
|
862
800
|
*
|
|
863
|
-
* @param show
|
|
801
|
+
* @param show The state of the popup.
|
|
864
802
|
*/
|
|
865
803
|
toggle(show) {
|
|
866
804
|
if (this.disabled || this.readonly) {
|
|
@@ -30,8 +30,17 @@ import * as i12 from "../calendar/templates/year-cell-template.directive";
|
|
|
30
30
|
import * as i13 from "@progress/kendo-angular-common";
|
|
31
31
|
// IMPORTANT: NgModule export kept for backwards compatibility
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* Required for adding all DatePicker features in [NgModule-based](link:site.data.urls.angular['ngmoduleapi']) Angular applications.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { DatePickerModule } from '@progress/kendo-angular-dateinputs';
|
|
38
|
+
*
|
|
39
|
+
* @NgModule({
|
|
40
|
+
* imports: [DatePickerModule]
|
|
41
|
+
* })
|
|
42
|
+
* export class AppModule { }
|
|
43
|
+
* ```
|
|
35
44
|
*/
|
|
36
45
|
export class DatePickerModule {
|
|
37
46
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -8,7 +8,17 @@ import { DatePickerMessages } from './messages';
|
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Allows you to override the default localization messages of the DatePicker component ([see example]({% slug globalization_dateinputs %}#toc-custom-messages)).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <kendo-datepicker>
|
|
16
|
+
* <kendo-datepicker-messages
|
|
17
|
+
* today="Today"
|
|
18
|
+
* toggle="Open calendar">
|
|
19
|
+
* </kendo-datepicker-messages>
|
|
20
|
+
* </kendo-datepicker>
|
|
21
|
+
* ```
|
|
12
22
|
*/
|
|
13
23
|
export class DatePickerCustomMessagesComponent extends DatePickerMessages {
|
|
14
24
|
service;
|
|
@@ -14,44 +14,42 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
import * as i1 from "./date-range.service";
|
|
15
15
|
import * as i2 from "../dateinput/dateinput.component";
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Manages the end date selection in a date range.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
19
|
+
* You can use the `DateRangeEndInputDirective` only with a DateInput component.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* @Component({
|
|
24
|
+
* selector: 'my-app',
|
|
25
|
+
* template: `
|
|
26
|
+
* <kendo-daterange>
|
|
27
|
+
* <kendo-dateinput kendoDateRangeStartInput [(value)]="startDate"></kendo-dateinput>
|
|
28
|
+
* <kendo-dateinput kendoDateRangeEndInput [(value)]="endDate"></kendo-dateinput>
|
|
29
|
+
* </kendo-daterange>
|
|
30
|
+
* `
|
|
31
|
+
* })
|
|
32
|
+
* export class AppComponent {
|
|
33
|
+
* public startDate: Date = new Date();
|
|
34
|
+
* public endDate: Date = new Date();
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
20
37
|
*/
|
|
21
38
|
export class DateRangeEndInputDirective extends DateRangeInput {
|
|
22
39
|
rangeService;
|
|
23
40
|
dateInput;
|
|
24
41
|
/**
|
|
25
|
-
* Specifies the auto-correction behavior. If the start date is greater than the end date, the
|
|
26
|
-
* directive fixes the date range to a single date either on input change or on blur
|
|
27
|
-
* ([see example](slug:autocorrect_daterange#toc-input-directives)).
|
|
42
|
+
* Specifies the auto-correction behavior. If the start date is greater than the end date, the directive fixes the date range to a single date either on input change or on blur ([see example](slug:autocorrect_daterange#toc-input-directives)).
|
|
28
43
|
*
|
|
29
44
|
* By default, the component does not perform any auto-correction.
|
|
45
|
+
*
|
|
30
46
|
*/
|
|
31
47
|
autoCorrectOn;
|
|
32
48
|
/**
|
|
33
49
|
* Specifies the navigation behavior of the calendar when the active end is changed on input focus. When enabled,
|
|
34
50
|
* the calendar navigates to the value of the focused input. Otherwise, the calendar displays the last picked date.
|
|
35
51
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* _@Component({
|
|
41
|
-
* selector: 'my-app',
|
|
42
|
-
* template: `
|
|
43
|
-
* <h5>Toggle input focus to see the calendar navigating between range ends.</h5>
|
|
44
|
-
* <kendo-daterange>
|
|
45
|
-
* <kendo-dateinput kendoDateRangeStartInput [navigateCalendarOnFocus]="true" [(value)]="start"></kendo-dateinput>
|
|
46
|
-
* <kendo-dateinput kendoDateRangeEndInput [navigateCalendarOnFocus]="true" [(value)]="end"></kendo-dateinput>
|
|
47
|
-
* </kendo-daterange>
|
|
48
|
-
* `
|
|
49
|
-
* })
|
|
50
|
-
* export class AppComponent {
|
|
51
|
-
* public start: Date = new Date(2018, 3, 10);
|
|
52
|
-
* public end: Date = new Date(2018, 10, 20);
|
|
53
|
-
* }
|
|
54
|
-
* ```
|
|
52
|
+
* @default false
|
|
55
53
|
*/
|
|
56
54
|
navigateCalendarOnFocus = false;
|
|
57
55
|
constructor(rangeService, dateInput, element, renderer, zone) {
|
|
@@ -5,8 +5,19 @@
|
|
|
5
5
|
import { Directive, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* `<ng-template>` tag with the `
|
|
8
|
+
* Renders the content of the DateRange Popup.
|
|
9
|
+
* To define the popup template, nest an `<ng-template>` tag with the `kendoDateRangePopupTemplate` directive inside the component tag.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <kendo-daterange>
|
|
14
|
+
* <ng-template kendoDateRangePopupTemplate>
|
|
15
|
+
* <div class="custom-popup-content">
|
|
16
|
+
* Custom content for the DateRange Popup
|
|
17
|
+
* </div>
|
|
18
|
+
* </ng-template>
|
|
19
|
+
* </kendo-daterange>
|
|
20
|
+
* ```
|
|
10
21
|
*/
|
|
11
22
|
export class DateRangePopupTemplateDirective {
|
|
12
23
|
templateRef;
|