@progress/kendo-angular-dateinputs 5.3.1-dev.202112011809 → 6.0.0-dev.202201181611
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/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dateinputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/calendar/calendar.component.js +14 -2
- package/dist/es/calendar/header.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +28 -12
- package/dist/es/calendar/multiview-calendar.module.js +9 -1
- package/dist/es/calendar/services/dom.service.js +1 -1
- package/dist/es/calendar/view.component.js +1 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/dateinput/dateinput.component.js +143 -18
- package/dist/es/datepicker/datepicker.component.js +130 -13
- package/dist/es/daterange/date-range-input.js +1 -1
- package/dist/es/datetimepicker/datetimepicker.component.js +147 -11
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/services/dom.service.js +12 -8
- package/dist/es/timepicker/timelist.component.js +3 -2
- package/dist/es/timepicker/timepicker.component.js +130 -13
- package/dist/es/timepicker/timeselector.component.js +2 -2
- package/dist/es/util.js +37 -0
- package/dist/es2015/calendar/calendar.component.d.ts +7 -0
- package/dist/es2015/calendar/calendar.component.js +14 -2
- package/dist/es2015/calendar/header.component.js +4 -4
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +8 -2
- package/dist/es2015/calendar/multiview-calendar.component.js +31 -11
- package/dist/es2015/calendar/multiview-calendar.module.js +9 -1
- package/dist/es2015/calendar/services/dom.service.js +1 -1
- package/dist/es2015/calendar/view.component.js +1 -1
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/dateinput/dateinput.component.d.ts +49 -8
- package/dist/es2015/dateinput/dateinput.component.js +183 -68
- package/dist/es2015/datepicker/datepicker.component.d.ts +47 -5
- package/dist/es2015/datepicker/datepicker.component.js +155 -49
- package/dist/es2015/daterange/date-range-input.js +1 -1
- package/dist/es2015/datetimepicker/datetimepicker.component.d.ts +56 -6
- package/dist/es2015/datetimepicker/datetimepicker.component.js +186 -63
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/timepicker/services/dom.service.d.ts +1 -0
- package/dist/es2015/timepicker/services/dom.service.js +12 -8
- package/dist/es2015/timepicker/timelist.component.js +3 -2
- package/dist/es2015/timepicker/timepicker.component.d.ts +50 -5
- package/dist/es2015/timepicker/timepicker.component.js +174 -69
- package/dist/es2015/timepicker/timeselector.component.js +7 -5
- package/dist/es2015/util.d.ts +18 -0
- package/dist/es2015/util.js +37 -0
- package/dist/fesm2015/index.js +821 -290
- package/dist/fesm5/index.js +663 -92
- package/dist/npm/calendar/calendar.component.js +14 -2
- package/dist/npm/calendar/header.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +27 -11
- package/dist/npm/calendar/multiview-calendar.module.js +9 -1
- package/dist/npm/calendar/services/dom.service.js +1 -1
- package/dist/npm/calendar/view.component.js +1 -1
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/dateinput/dateinput.component.js +142 -17
- package/dist/npm/datepicker/datepicker.component.js +129 -12
- package/dist/npm/daterange/date-range-input.js +1 -1
- package/dist/npm/datetimepicker/datetimepicker.component.js +146 -10
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/services/dom.service.js +15 -10
- package/dist/npm/timepicker/timelist.component.js +3 -2
- package/dist/npm/timepicker/timepicker.component.js +129 -12
- package/dist/npm/timepicker/timeselector.component.js +2 -2
- package/dist/npm/util.js +37 -0
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +2 -2
|
@@ -27,7 +27,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
|
|
|
27
27
|
import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
|
|
28
28
|
import { PickerService } from '../common/picker.service';
|
|
29
29
|
import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
|
|
30
|
-
import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar } from '../util';
|
|
30
|
+
import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar, getSizeClass, getRoundedClass, getFillModeClass } from '../util';
|
|
31
31
|
import { TOUCH_ENABLED } from '../touch-enabled';
|
|
32
32
|
import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
|
|
33
33
|
import { fromEvent } from 'rxjs';
|
|
@@ -42,12 +42,12 @@ var TWO_DIGIT_YEAR_MAX = 68;
|
|
|
42
42
|
* Represents the [Kendo UI DatePicker component for Angular]({% slug overview_datepicker %}#toc-basic-usage).
|
|
43
43
|
*/
|
|
44
44
|
var DatePickerComponent = /** @class */ (function () {
|
|
45
|
-
function DatePickerComponent(zone, localization, cdr, popupService,
|
|
45
|
+
function DatePickerComponent(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService, touchEnabled) {
|
|
46
46
|
this.zone = zone;
|
|
47
47
|
this.localization = localization;
|
|
48
48
|
this.cdr = cdr;
|
|
49
49
|
this.popupService = popupService;
|
|
50
|
-
this.
|
|
50
|
+
this.wrapper = wrapper;
|
|
51
51
|
this.renderer = renderer;
|
|
52
52
|
this.injector = injector;
|
|
53
53
|
this.pickerService = pickerService;
|
|
@@ -273,6 +273,9 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
273
273
|
this.incompleteValidator = noop;
|
|
274
274
|
this.resolvedPromise = Promise.resolve(null);
|
|
275
275
|
this.domEvents = [];
|
|
276
|
+
this._size = 'medium';
|
|
277
|
+
this._rounded = 'medium';
|
|
278
|
+
this._fillMode = 'solid';
|
|
276
279
|
validatePackage(packageMetadata);
|
|
277
280
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
278
281
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -423,6 +426,85 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
423
426
|
enumerable: true,
|
|
424
427
|
configurable: true
|
|
425
428
|
});
|
|
429
|
+
Object.defineProperty(DatePickerComponent.prototype, "size", {
|
|
430
|
+
get: function () {
|
|
431
|
+
return this._size;
|
|
432
|
+
},
|
|
433
|
+
/**
|
|
434
|
+
* Sets the size of the component.
|
|
435
|
+
*
|
|
436
|
+
* The possible values are:
|
|
437
|
+
* * `'small'`
|
|
438
|
+
* * `'medium'` (Default)
|
|
439
|
+
* * `'large'`
|
|
440
|
+
* * `null`
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
443
|
+
set: function (size) {
|
|
444
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
445
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
446
|
+
if (size) {
|
|
447
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
448
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
449
|
+
}
|
|
450
|
+
this._size = size;
|
|
451
|
+
},
|
|
452
|
+
enumerable: true,
|
|
453
|
+
configurable: true
|
|
454
|
+
});
|
|
455
|
+
Object.defineProperty(DatePickerComponent.prototype, "rounded", {
|
|
456
|
+
get: function () {
|
|
457
|
+
return this._rounded;
|
|
458
|
+
},
|
|
459
|
+
/**
|
|
460
|
+
* Sets the border radius of the component.
|
|
461
|
+
*
|
|
462
|
+
* The possible values are:
|
|
463
|
+
* * `'small'`
|
|
464
|
+
* * `'medium'` (Default)
|
|
465
|
+
* * `'large'`
|
|
466
|
+
* * `'full'`
|
|
467
|
+
* * `null`
|
|
468
|
+
*
|
|
469
|
+
*/
|
|
470
|
+
set: function (rounded) {
|
|
471
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
472
|
+
if (rounded) {
|
|
473
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
474
|
+
}
|
|
475
|
+
this._rounded = rounded;
|
|
476
|
+
},
|
|
477
|
+
enumerable: true,
|
|
478
|
+
configurable: true
|
|
479
|
+
});
|
|
480
|
+
Object.defineProperty(DatePickerComponent.prototype, "fillMode", {
|
|
481
|
+
get: function () {
|
|
482
|
+
return this._fillMode;
|
|
483
|
+
},
|
|
484
|
+
/**
|
|
485
|
+
* Sets the fillMode of the component.
|
|
486
|
+
*
|
|
487
|
+
* The possible values are:
|
|
488
|
+
* * `'solid'` (Default)
|
|
489
|
+
* * `'flat'`
|
|
490
|
+
* * `'outline'`
|
|
491
|
+
* * `null`
|
|
492
|
+
*
|
|
493
|
+
*/
|
|
494
|
+
set: function (fillMode) {
|
|
495
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
496
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
497
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
498
|
+
if (fillMode) {
|
|
499
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
500
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
501
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
502
|
+
}
|
|
503
|
+
this._fillMode = fillMode;
|
|
504
|
+
},
|
|
505
|
+
enumerable: true,
|
|
506
|
+
configurable: true
|
|
507
|
+
});
|
|
426
508
|
Object.defineProperty(DatePickerComponent.prototype, "disabledClass", {
|
|
427
509
|
/**
|
|
428
510
|
* @hidden
|
|
@@ -454,10 +536,10 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
454
536
|
}
|
|
455
537
|
var element = this.wrapper.nativeElement;
|
|
456
538
|
if (value) {
|
|
457
|
-
this.renderer.addClass(element, 'k-
|
|
539
|
+
this.renderer.addClass(element, 'k-focus');
|
|
458
540
|
}
|
|
459
541
|
else {
|
|
460
|
-
this.renderer.removeClass(element, 'k-
|
|
542
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
461
543
|
}
|
|
462
544
|
},
|
|
463
545
|
enumerable: true,
|
|
@@ -501,13 +583,16 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
501
583
|
.changes
|
|
502
584
|
.subscribe(function () { return _this.cdr.markForCheck(); });
|
|
503
585
|
this.control = this.injector.get(NgControl, null);
|
|
504
|
-
if (this.
|
|
505
|
-
this.renderer.removeAttribute(this.
|
|
586
|
+
if (this.wrapper) {
|
|
587
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
506
588
|
this.zone.runOutsideAngular(function () {
|
|
507
589
|
_this.bindEvents();
|
|
508
590
|
});
|
|
509
591
|
}
|
|
510
592
|
};
|
|
593
|
+
DatePickerComponent.prototype.ngAfterViewInit = function () {
|
|
594
|
+
this.setComponentClasses();
|
|
595
|
+
};
|
|
511
596
|
/**
|
|
512
597
|
* @hidden
|
|
513
598
|
*/
|
|
@@ -730,6 +815,9 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
730
815
|
this.show = false;
|
|
731
816
|
}
|
|
732
817
|
}
|
|
818
|
+
if (keyCode === Keys.Enter && target.classList.contains('k-calendar')) {
|
|
819
|
+
e.preventDefault(); // Don't submit form on date selection in popup
|
|
820
|
+
}
|
|
733
821
|
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
734
822
|
this.input.focus();
|
|
735
823
|
this.show = false;
|
|
@@ -818,7 +906,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
818
906
|
}
|
|
819
907
|
};
|
|
820
908
|
DatePickerComponent.prototype.bindEvents = function () {
|
|
821
|
-
var element = this.
|
|
909
|
+
var element = this.wrapper.nativeElement;
|
|
822
910
|
this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
|
|
823
911
|
if (isWindowAvailable()) {
|
|
824
912
|
this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
|
|
@@ -877,6 +965,20 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
877
965
|
this.cdr.markForCheck();
|
|
878
966
|
this.zone.run(function () { return _this.onValidatorChange(); });
|
|
879
967
|
};
|
|
968
|
+
DatePickerComponent.prototype.setComponentClasses = function () {
|
|
969
|
+
if (this.size) {
|
|
970
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
971
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
972
|
+
}
|
|
973
|
+
if (this.rounded) {
|
|
974
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
975
|
+
}
|
|
976
|
+
if (this.fillMode) {
|
|
977
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
978
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
979
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
980
|
+
}
|
|
981
|
+
};
|
|
880
982
|
var DatePickerComponent_1;
|
|
881
983
|
tslib_1.__decorate([
|
|
882
984
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
@@ -887,9 +989,9 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
887
989
|
tslib_1.__metadata("design:type", TemplateRef)
|
|
888
990
|
], DatePickerComponent.prototype, "popupTemplate", void 0);
|
|
889
991
|
tslib_1.__decorate([
|
|
890
|
-
ViewChild('
|
|
992
|
+
ViewChild('toggleButton', { static: true }),
|
|
891
993
|
tslib_1.__metadata("design:type", ElementRef)
|
|
892
|
-
], DatePickerComponent.prototype, "
|
|
994
|
+
], DatePickerComponent.prototype, "toggleButton", void 0);
|
|
893
995
|
tslib_1.__decorate([
|
|
894
996
|
ContentChild(CellTemplateDirective, { static: false }),
|
|
895
997
|
tslib_1.__metadata("design:type", CellTemplateDirective)
|
|
@@ -1074,6 +1176,21 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
1074
1176
|
Input(),
|
|
1075
1177
|
tslib_1.__metadata("design:type", Boolean)
|
|
1076
1178
|
], DatePickerComponent.prototype, "weekNumber", void 0);
|
|
1179
|
+
tslib_1.__decorate([
|
|
1180
|
+
Input(),
|
|
1181
|
+
tslib_1.__metadata("design:type", String),
|
|
1182
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1183
|
+
], DatePickerComponent.prototype, "size", null);
|
|
1184
|
+
tslib_1.__decorate([
|
|
1185
|
+
Input(),
|
|
1186
|
+
tslib_1.__metadata("design:type", String),
|
|
1187
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1188
|
+
], DatePickerComponent.prototype, "rounded", null);
|
|
1189
|
+
tslib_1.__decorate([
|
|
1190
|
+
Input(),
|
|
1191
|
+
tslib_1.__metadata("design:type", String),
|
|
1192
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1193
|
+
], DatePickerComponent.prototype, "fillMode", null);
|
|
1077
1194
|
tslib_1.__decorate([
|
|
1078
1195
|
Output(),
|
|
1079
1196
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -1095,12 +1212,12 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
1095
1212
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
1096
1213
|
], DatePickerComponent.prototype, "close", void 0);
|
|
1097
1214
|
tslib_1.__decorate([
|
|
1098
|
-
HostBinding('class.k-widget'),
|
|
1099
1215
|
HostBinding('class.k-datepicker'),
|
|
1216
|
+
HostBinding('class.k-input'),
|
|
1100
1217
|
tslib_1.__metadata("design:type", Boolean)
|
|
1101
1218
|
], DatePickerComponent.prototype, "wrapperClasses", void 0);
|
|
1102
1219
|
tslib_1.__decorate([
|
|
1103
|
-
HostBinding('class.k-
|
|
1220
|
+
HostBinding('class.k-disabled'),
|
|
1104
1221
|
tslib_1.__metadata("design:type", Boolean),
|
|
1105
1222
|
tslib_1.__metadata("design:paramtypes", [])
|
|
1106
1223
|
], DatePickerComponent.prototype, "disabledClass", null);
|
|
@@ -1121,7 +1238,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
1121
1238
|
}
|
|
1122
1239
|
],
|
|
1123
1240
|
selector: 'kendo-datepicker',
|
|
1124
|
-
template: "\n <ng-container kendoDatePickerLocalizedMessages\n i18n-today=\"kendo.datepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-toggle=\"kendo.datepicker.toggle|The title of the toggle button in the datepicker component\"\n toggle=\"Toggle calendar\"\n\n i18n-prevButtonTitle=\"kendo.datepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <
|
|
1241
|
+
template: "\n <ng-container kendoDatePickerLocalizedMessages\n i18n-today=\"kendo.datepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-toggle=\"kendo.datepicker.toggle|The title of the toggle button in the datepicker component\"\n toggle=\"Toggle calendar\"\n\n i18n-prevButtonTitle=\"kendo.datepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-dateinput\n #input\n [role]=\"inputRole\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"show\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [ariaReadOnly]=\"readonly\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [fillMode]=\"null\"\n [rounded]=\"null\"\n [size]=\"null\"\n [value]=\"value\"\n (valueChange)=\"handleInputChange($event)\"\n ></kendo-dateinput>\n <button\n #toggleButton\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [tabindex]=\"-1\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleIconClick,\n mousedown: handleMousedown\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-button-icon k-icon k-i-calendar\"></span>\n </button>\n <ng-container #container></ng-container>\n <ng-template #popupTemplate>\n <kendo-calendar\n #calendar\n [type]=\"calendarType\"\n [min]=\"min\"\n [max]=\"max\"\n [navigation]=\"navigation\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [activeView]=\"activeView\"\n [bottomView]=\"bottomView\"\n [topView]=\"topView\"\n [weekNumber]=\"weekNumber\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [navigationItemTemplate]=\"navigationItemTemplate\"\n [focusedDate]=\"focusedDate\"\n [value]=\"value\"\n (valueChange)=\"handleChange(mergeTime($event))\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeydown\n }\"\n [scope]=\"this\"\n [disabledDates]=\"disabledDates\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n <ng-template>\n "
|
|
1125
1242
|
}),
|
|
1126
1243
|
tslib_1.__param(9, Optional()), tslib_1.__param(9, Inject(TOUCH_ENABLED)),
|
|
1127
1244
|
tslib_1.__metadata("design:paramtypes", [NgZone,
|
|
@@ -123,7 +123,7 @@ var DateRangeInput = /** @class */ (function () {
|
|
|
123
123
|
var action = show ? 'addClass' : 'removeClass';
|
|
124
124
|
var nativeElement = this.element.nativeElement;
|
|
125
125
|
if (nativeElement && nativeElement.querySelector) {
|
|
126
|
-
this.renderer[action](nativeElement
|
|
126
|
+
this.renderer[action](nativeElement, 'k-focus');
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
return DateRangeInput;
|
|
@@ -17,7 +17,7 @@ import { packageMetadata } from '../package-metadata';
|
|
|
17
17
|
import { PickerService } from '../common/picker.service';
|
|
18
18
|
import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
|
|
19
19
|
import { isPresent } from '../common/utils';
|
|
20
|
-
import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable } from '../util';
|
|
20
|
+
import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable, getFillModeClass, getRoundedClass, getSizeClass } from '../util';
|
|
21
21
|
import { PreventableEvent } from '../preventable-event';
|
|
22
22
|
import { minValidator } from '../validators/min.validator';
|
|
23
23
|
import { maxValidator } from '../validators/max.validator';
|
|
@@ -44,13 +44,13 @@ var TWO_DIGIT_YEAR_MAX = 68;
|
|
|
44
44
|
* Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
|
|
45
45
|
*/
|
|
46
46
|
var DateTimePickerComponent = /** @class */ (function () {
|
|
47
|
-
function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone,
|
|
47
|
+
function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone, wrapper, touchEnabled, localization, disabledDatesService, renderer) {
|
|
48
48
|
this.popupService = popupService;
|
|
49
49
|
this.intl = intl;
|
|
50
50
|
this.cdr = cdr;
|
|
51
51
|
this.pickerService = pickerService;
|
|
52
52
|
this.ngZone = ngZone;
|
|
53
|
-
this.
|
|
53
|
+
this.wrapper = wrapper;
|
|
54
54
|
this.touchEnabled = touchEnabled;
|
|
55
55
|
this.localization = localization;
|
|
56
56
|
this.disabledDatesService = disabledDatesService;
|
|
@@ -217,9 +217,22 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
217
217
|
this.disabledDatesValidateFn = noop;
|
|
218
218
|
this.incompleteValidator = noop;
|
|
219
219
|
this.subscriptions = new Subscription();
|
|
220
|
+
this._size = 'medium';
|
|
221
|
+
this._rounded = 'medium';
|
|
222
|
+
this._fillMode = 'solid';
|
|
220
223
|
validatePackage(packageMetadata);
|
|
221
224
|
}
|
|
222
225
|
DateTimePickerComponent_1 = DateTimePickerComponent;
|
|
226
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "disabledClass", {
|
|
227
|
+
/**
|
|
228
|
+
* @hidden
|
|
229
|
+
*/
|
|
230
|
+
get: function () {
|
|
231
|
+
return this.disabled;
|
|
232
|
+
},
|
|
233
|
+
enumerable: true,
|
|
234
|
+
configurable: true
|
|
235
|
+
});
|
|
223
236
|
Object.defineProperty(DateTimePickerComponent.prototype, "input", {
|
|
224
237
|
/**
|
|
225
238
|
* @hidden
|
|
@@ -400,10 +413,10 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
400
413
|
},
|
|
401
414
|
set: function (value) {
|
|
402
415
|
if (value) {
|
|
403
|
-
this.renderer.addClass(this.wrapper.nativeElement, 'k-
|
|
416
|
+
this.renderer.addClass(this.wrapper.nativeElement, 'k-focus');
|
|
404
417
|
}
|
|
405
418
|
else {
|
|
406
|
-
this.renderer.removeClass(this.wrapper.nativeElement, 'k-
|
|
419
|
+
this.renderer.removeClass(this.wrapper.nativeElement, 'k-focus');
|
|
407
420
|
}
|
|
408
421
|
this._isActive = value;
|
|
409
422
|
},
|
|
@@ -425,6 +438,85 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
425
438
|
enumerable: true,
|
|
426
439
|
configurable: true
|
|
427
440
|
});
|
|
441
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "size", {
|
|
442
|
+
get: function () {
|
|
443
|
+
return this._size;
|
|
444
|
+
},
|
|
445
|
+
/**
|
|
446
|
+
* Sets the size of the component.
|
|
447
|
+
*
|
|
448
|
+
* The possible values are:
|
|
449
|
+
* * `'small'`
|
|
450
|
+
* * `'medium'` (Default)
|
|
451
|
+
* * `'large'`
|
|
452
|
+
* * `null`
|
|
453
|
+
*
|
|
454
|
+
*/
|
|
455
|
+
set: function (size) {
|
|
456
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
457
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
458
|
+
if (size) {
|
|
459
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
460
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
461
|
+
}
|
|
462
|
+
this._size = size;
|
|
463
|
+
},
|
|
464
|
+
enumerable: true,
|
|
465
|
+
configurable: true
|
|
466
|
+
});
|
|
467
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "rounded", {
|
|
468
|
+
get: function () {
|
|
469
|
+
return this._rounded;
|
|
470
|
+
},
|
|
471
|
+
/**
|
|
472
|
+
* Sets the border radius of the component.
|
|
473
|
+
*
|
|
474
|
+
* The possible values are:
|
|
475
|
+
* * `'small'`
|
|
476
|
+
* * `'medium'` (Default)
|
|
477
|
+
* * `'large'`
|
|
478
|
+
* * `'full'`
|
|
479
|
+
* * `null`
|
|
480
|
+
*
|
|
481
|
+
*/
|
|
482
|
+
set: function (rounded) {
|
|
483
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
484
|
+
if (rounded) {
|
|
485
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
486
|
+
}
|
|
487
|
+
this._rounded = rounded;
|
|
488
|
+
},
|
|
489
|
+
enumerable: true,
|
|
490
|
+
configurable: true
|
|
491
|
+
});
|
|
492
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "fillMode", {
|
|
493
|
+
get: function () {
|
|
494
|
+
return this._fillMode;
|
|
495
|
+
},
|
|
496
|
+
/**
|
|
497
|
+
* Sets the fillMode of the component.
|
|
498
|
+
*
|
|
499
|
+
* The possible values are:
|
|
500
|
+
* * `'solid'` (Default)
|
|
501
|
+
* * `'flat'`
|
|
502
|
+
* * `'outline'`
|
|
503
|
+
* * `null`
|
|
504
|
+
*
|
|
505
|
+
*/
|
|
506
|
+
set: function (fillMode) {
|
|
507
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
508
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
509
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
510
|
+
if (fillMode) {
|
|
511
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
512
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
513
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
514
|
+
}
|
|
515
|
+
this._fillMode = fillMode;
|
|
516
|
+
},
|
|
517
|
+
enumerable: true,
|
|
518
|
+
configurable: true
|
|
519
|
+
});
|
|
428
520
|
Object.defineProperty(DateTimePickerComponent.prototype, "tabSwitchTransition", {
|
|
429
521
|
/**
|
|
430
522
|
* @hidden
|
|
@@ -515,6 +607,9 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
515
607
|
this.subscriptions.add(this.ngZone.runOutsideAngular(function () { return fromEvent(window, 'blur').subscribe(_this.handleCancel.bind(_this)); }));
|
|
516
608
|
}
|
|
517
609
|
};
|
|
610
|
+
DateTimePickerComponent.prototype.ngAfterViewInit = function () {
|
|
611
|
+
this.setComponentClasses();
|
|
612
|
+
};
|
|
518
613
|
DateTimePickerComponent.prototype.ngOnChanges = function (changes) {
|
|
519
614
|
if (isPresent(changes.min) || isPresent(changes.max)) {
|
|
520
615
|
this.verifyMinMaxRange();
|
|
@@ -669,7 +764,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
669
764
|
return;
|
|
670
765
|
}
|
|
671
766
|
this.isActive = false;
|
|
672
|
-
var isNgControlUntouched = this.
|
|
767
|
+
var isNgControlUntouched = this.wrapper.nativeElement.classList.contains('ng-untouched');
|
|
673
768
|
var runInZone = isNgControlUntouched || hasObservers(this.onBlur) || (this.isOpen && hasObservers(this.close));
|
|
674
769
|
this.run(runInZone, function () {
|
|
675
770
|
_this.onBlur.emit();
|
|
@@ -797,6 +892,13 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
797
892
|
this.input.focus();
|
|
798
893
|
}
|
|
799
894
|
};
|
|
895
|
+
/**
|
|
896
|
+
* @hidden
|
|
897
|
+
*/
|
|
898
|
+
DateTimePickerComponent.prototype.popupButtonsClasses = function (type) {
|
|
899
|
+
var buttonType = type ? type : 'base';
|
|
900
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : '');
|
|
901
|
+
};
|
|
800
902
|
/**
|
|
801
903
|
* @hidden
|
|
802
904
|
*
|
|
@@ -921,7 +1023,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
921
1023
|
};
|
|
922
1024
|
/**
|
|
923
1025
|
* Indicates whether the focus target is part of this component,
|
|
924
|
-
* that is, whether the focus target is inside the component
|
|
1026
|
+
* that is, whether the focus target is inside the component or in the popup.
|
|
925
1027
|
*/
|
|
926
1028
|
DateTimePickerComponent.prototype.focusTargetInComponent = function (event) {
|
|
927
1029
|
if (!isPresent(event)) {
|
|
@@ -968,16 +1070,35 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
968
1070
|
this.cdr.markForCheck();
|
|
969
1071
|
this.ngZone.run(function () { return _this.onValidatorChange(); });
|
|
970
1072
|
};
|
|
1073
|
+
DateTimePickerComponent.prototype.setComponentClasses = function () {
|
|
1074
|
+
if (this.size) {
|
|
1075
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1076
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
1077
|
+
}
|
|
1078
|
+
if (this.rounded) {
|
|
1079
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1080
|
+
}
|
|
1081
|
+
if (this.fillMode) {
|
|
1082
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1083
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
1084
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
971
1087
|
var DateTimePickerComponent_1;
|
|
972
1088
|
tslib_1.__decorate([
|
|
973
|
-
HostBinding('class.k-widget'),
|
|
974
1089
|
HostBinding('class.k-datetimepicker'),
|
|
1090
|
+
HostBinding('class.k-input'),
|
|
975
1091
|
tslib_1.__metadata("design:type", Boolean)
|
|
976
1092
|
], DateTimePickerComponent.prototype, "hostClasses", void 0);
|
|
977
1093
|
tslib_1.__decorate([
|
|
978
|
-
|
|
1094
|
+
HostBinding('class.k-disabled'),
|
|
1095
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1096
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1097
|
+
], DateTimePickerComponent.prototype, "disabledClass", null);
|
|
1098
|
+
tslib_1.__decorate([
|
|
1099
|
+
ViewChild('toggleButton', { static: true }),
|
|
979
1100
|
tslib_1.__metadata("design:type", ElementRef)
|
|
980
|
-
], DateTimePickerComponent.prototype, "
|
|
1101
|
+
], DateTimePickerComponent.prototype, "toggleButton", void 0);
|
|
981
1102
|
tslib_1.__decorate([
|
|
982
1103
|
Input(),
|
|
983
1104
|
tslib_1.__metadata("design:type", Date),
|
|
@@ -1106,6 +1227,21 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
1106
1227
|
tslib_1.__metadata("design:type", String),
|
|
1107
1228
|
tslib_1.__metadata("design:paramtypes", [String])
|
|
1108
1229
|
], DateTimePickerComponent.prototype, "defaultTab", null);
|
|
1230
|
+
tslib_1.__decorate([
|
|
1231
|
+
Input(),
|
|
1232
|
+
tslib_1.__metadata("design:type", String),
|
|
1233
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1234
|
+
], DateTimePickerComponent.prototype, "size", null);
|
|
1235
|
+
tslib_1.__decorate([
|
|
1236
|
+
Input(),
|
|
1237
|
+
tslib_1.__metadata("design:type", String),
|
|
1238
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1239
|
+
], DateTimePickerComponent.prototype, "rounded", null);
|
|
1240
|
+
tslib_1.__decorate([
|
|
1241
|
+
Input(),
|
|
1242
|
+
tslib_1.__metadata("design:type", String),
|
|
1243
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1244
|
+
], DateTimePickerComponent.prototype, "fillMode", null);
|
|
1109
1245
|
tslib_1.__decorate([
|
|
1110
1246
|
ContentChild(CellTemplateDirective, { static: false }),
|
|
1111
1247
|
tslib_1.__metadata("design:type", CellTemplateDirective)
|
|
@@ -1156,7 +1292,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
1156
1292
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }), multi: true },
|
|
1157
1293
|
{ provide: KendoInput, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }) }
|
|
1158
1294
|
],
|
|
1159
|
-
template: "\n <ng-container\n kendoDateTimePickerLocalizedMessages\n\n i18n-dateTab=\"kendo.datetimepicker.dateTab|The Date tab text in the datetimepicker popup header\"\n dateTab=\"Date\"\n\n i18n-dateTabLabel=\"kendo.datetimepicker.dateTabLabel|The label for the Date tab in the datetimepicker popup header\"\n dateTabLabel=\"Date tab\"\n\n i18n-timeTab=\"kendo.datetimepicker.timeTab|The Time tab text in the datetimepicker popup header\"\n timeTab=\"Time\"\n\n i18n-timeTabLabel=\"kendo.datetimepicker.timeTabLabel|The label for the Time tab in the datetimepicker popup header\"\n timeTabLabel=\"Time tab\"\n\n i18n-toggle=\"kendo.datetimepicker.toggle|The title of the toggle button in the datetimepicker component\"\n toggle=\"Toggle popup\"\n\n i18n-accept=\"kendo.datetimepicker.accept|The Accept button text in the datetimepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.datetimepicker.acceptLabel|The label for the Accept button in the datetimepicker component\"\n acceptLabel=\"Set\"\n\n i18n-cancel=\"kendo.datetimepicker.cancel|The Cancel button text in the datetimepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.datetimepicker.cancelLabel|The label for the Cancel button in the datetimepicker component\"\n cancelLabel=\"Cancel\"\n\n i18n-now=\"kendo.datetimepicker.now|The Now button text in the timepicker component\"\n now=\"NOW\"\n\n i18n-nowLabel=\"kendo.datetimepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-today=\"kendo.datetimepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.datetimepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datetimepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n\n <span\n #wrapper\n class=\"k-picker-wrap\"\n [class.k-state-disabled]=\"disabled\"\n >\n <kendo-dateinput\n [value]=\"value\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [role]=\"inputRole\"\n [ariaReadOnly]=\"readonly\"\n [steps]=\"steps\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"isOpen\"\n (valueChange)=\"handleInputValueChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n </kendo-dateinput>\n <span class=\"k-select\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n click: handleIconClick\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-link k-link-date\">\n <span\n class=\"k-icon\"\n [class.k-i-calendar]=\"activeTab === 'date'\"\n [class.k-i-clock]=\"activeTab === 'time'\"\n >\n </span>\n </span>\n </span>\n </span>\n\n <ng-container #container></ng-container>\n\n <ng-template #popupTemplate>\n <div\n class=\"k-datetime-wrap k-{{activeTab}}-tab\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-datetime-buttongroup\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-button-group k-button-group-stretched\">\n <button\n type=\"button\"\n class=\"k-button k-date-tab\"\n [class.k-state-active]=\"activeTab === 'date'\"\n [attr.title]=\"localization.get('dateTabLabel')\"\n [attr.aria-label]=\"localization.get('dateTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'date'),\n keydown: handleBackTabOut\n }\"\n [scope]=\"this\"\n >\n {{localization.get('dateTab')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-time-tab\"\n [class.k-state-active]=\"activeTab === 'time'\"\n [attr.title]=\"localization.get('timeTabLabel')\"\n [attr.aria-label]=\"localization.get('timeTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'time')\n }\"\n >\n {{localization.get('timeTab')}}\n </button>\n </div>\n </div>\n <div\n #dateTimeSelector\n class=\"k-datetime-selector\"\n [style.transition]=\"tabSwitchTransition\"\n [kendoEventsOutsideAngular]=\"{\n transitionend: handleTabChangeTransitionEnd.bind(this, dateTimeSelector)\n }\"\n >\n <div class=\"k-datetime-calendar-wrap\">\n <kendo-calendar\n [(value)]=\"calendarValue\"\n [type]=\"calendarType\"\n [min]=\"calendarMin\"\n [max]=\"calendarMax\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [navigation]=\"false\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [disabled]=\"disableCalendar\"\n [disabledDates]=\"disabledDates\"\n (valueChange)=\"handleCalendarValueChange()\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n </div>\n <div class=\"k-datetime-time-wrap\">\n <kendo-timeselector\n [value]=\"value\"\n [format]=\"timeSelectorFormat\"\n [min]=\"timeSelectorMin\"\n [max]=\"timeSelectorMax\"\n [setButton]=\"false\"\n [cancelButton]=\"false\"\n [steps]=\"steps\"\n [disabled]=\"disableTimeSelector\"\n >\n <kendo-timeselector-messages\n [now]=\"localization.get('now')\"\n [nowLabel]=\"localization.get('nowLabel')\"\n >\n </kendo-timeselector-messages>\n </kendo-timeselector>\n </div>\n </div>\n <div\n class=\"k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleTabOut,\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <button\n *ngIf=\"cancelButton\"\n type=\"button\"\n class=\"k-button k-time-cancel\"\n [attr.title]=\"localization.get('cancelLabel')\"\n [attr.aria-label]=\"localization.get('cancelLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleCancel\n }\"\n [scope]=\"this\"\n >\n {{localization.get('cancel')}}\n </button>\n <button\n type=\"button\"\n class=\"k-time-accept k-button k-primary\"\n [attr.title]=\"localization.get('acceptLabel')\"\n [attr.aria-label]=\"localization.get('acceptLabel')\"\n [disabled]=\"!calendarValue\"\n [kendoEventsOutsideAngular]=\"{\n click: handleAccept\n }\"\n [scope]=\"this\"\n >\n {{localization.get('accept')}}\n </button>\n </div>\n </div>\n </ng-template>\n "
|
|
1295
|
+
template: "\n <ng-container\n kendoDateTimePickerLocalizedMessages\n\n i18n-dateTab=\"kendo.datetimepicker.dateTab|The Date tab text in the datetimepicker popup header\"\n dateTab=\"Date\"\n\n i18n-dateTabLabel=\"kendo.datetimepicker.dateTabLabel|The label for the Date tab in the datetimepicker popup header\"\n dateTabLabel=\"Date tab\"\n\n i18n-timeTab=\"kendo.datetimepicker.timeTab|The Time tab text in the datetimepicker popup header\"\n timeTab=\"Time\"\n\n i18n-timeTabLabel=\"kendo.datetimepicker.timeTabLabel|The label for the Time tab in the datetimepicker popup header\"\n timeTabLabel=\"Time tab\"\n\n i18n-toggle=\"kendo.datetimepicker.toggle|The title of the toggle button in the datetimepicker component\"\n toggle=\"Toggle popup\"\n\n i18n-accept=\"kendo.datetimepicker.accept|The Accept button text in the datetimepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.datetimepicker.acceptLabel|The label for the Accept button in the datetimepicker component\"\n acceptLabel=\"Set\"\n\n i18n-cancel=\"kendo.datetimepicker.cancel|The Cancel button text in the datetimepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.datetimepicker.cancelLabel|The label for the Cancel button in the datetimepicker component\"\n cancelLabel=\"Cancel\"\n\n i18n-now=\"kendo.datetimepicker.now|The Now button text in the timepicker component\"\n now=\"NOW\"\n\n i18n-nowLabel=\"kendo.datetimepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-today=\"kendo.datetimepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.datetimepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datetimepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n\n <kendo-dateinput\n [value]=\"value\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [role]=\"inputRole\"\n [ariaReadOnly]=\"readonly\"\n [steps]=\"steps\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"isOpen\"\n (valueChange)=\"handleInputValueChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n [fillMode]=\"fillMode\"\n [rounded]=\"rounded\"\n [size]=\"size\"\n >\n </kendo-dateinput>\n <button\n #toggleButton\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [tabindex]=\"-1\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n click: handleIconClick\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-button-icon k-icon\"\n [ngClass]=\"{\n 'k-i-calendar': activeTab === 'date',\n 'k-i-clock': activeTab === 'time'\n }\"\n ></span>\n </button>\n\n <ng-container #container></ng-container>\n\n <ng-template #popupTemplate>\n <div\n class=\"k-datetime-wrap k-{{activeTab}}-tab\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-datetime-buttongroup\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-button-group k-button-group-stretched\">\n <button\n type=\"button\"\n class=\"k-button k-group-start k-date-tab\"\n [ngClass]=\"popupButtonsClasses()\"\n [class.k-active]=\"activeTab === 'date'\"\n [attr.title]=\"localization.get('dateTabLabel')\"\n [attr.aria-label]=\"localization.get('dateTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'date'),\n keydown: handleBackTabOut\n }\"\n [scope]=\"this\"\n >\n {{localization.get('dateTab')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-group-end k-time-tab\"\n [ngClass]=\"popupButtonsClasses()\"\n [class.k-active]=\"activeTab === 'time'\"\n [attr.title]=\"localization.get('timeTabLabel')\"\n [attr.aria-label]=\"localization.get('timeTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'time')\n }\"\n >\n {{localization.get('timeTab')}}\n </button>\n </div>\n </div>\n <div\n #dateTimeSelector\n class=\"k-datetime-selector\"\n [style.transition]=\"tabSwitchTransition\"\n [kendoEventsOutsideAngular]=\"{\n transitionend: handleTabChangeTransitionEnd.bind(this, dateTimeSelector)\n }\"\n >\n <div class=\"k-datetime-calendar-wrap\">\n <kendo-calendar\n [(value)]=\"calendarValue\"\n [type]=\"calendarType\"\n [min]=\"calendarMin\"\n [max]=\"calendarMax\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [navigation]=\"false\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [disabled]=\"disableCalendar\"\n [disabledDates]=\"disabledDates\"\n (valueChange)=\"handleCalendarValueChange()\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n </div>\n <div class=\"k-datetime-time-wrap\">\n <kendo-timeselector\n [value]=\"value\"\n [format]=\"timeSelectorFormat\"\n [min]=\"timeSelectorMin\"\n [max]=\"timeSelectorMax\"\n [setButton]=\"false\"\n [cancelButton]=\"false\"\n [steps]=\"steps\"\n [disabled]=\"disableTimeSelector\"\n >\n <kendo-timeselector-messages\n [now]=\"localization.get('now')\"\n [nowLabel]=\"localization.get('nowLabel')\"\n >\n </kendo-timeselector-messages>\n </kendo-timeselector>\n </div>\n </div>\n <div\n class=\"k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleTabOut,\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <button\n *ngIf=\"cancelButton\"\n type=\"button\"\n class=\"k-button k-time-cancel\"\n [ngClass]=\"popupButtonsClasses()\"\n [attr.title]=\"localization.get('cancelLabel')\"\n [attr.aria-label]=\"localization.get('cancelLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleCancel\n }\"\n [scope]=\"this\"\n >\n {{localization.get('cancel')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-time-accept\"\n [ngClass]=\"popupButtonsClasses('primary')\"\n [attr.title]=\"localization.get('acceptLabel')\"\n [attr.aria-label]=\"localization.get('acceptLabel')\"\n [disabled]=\"!calendarValue\"\n [kendoEventsOutsideAngular]=\"{\n click: handleAccept\n }\"\n [scope]=\"this\"\n >\n {{localization.get('accept')}}\n </button>\n </div>\n </div>\n </ng-template>\n "
|
|
1160
1296
|
}),
|
|
1161
1297
|
tslib_1.__param(6, Inject(TOUCH_ENABLED)),
|
|
1162
1298
|
tslib_1.__metadata("design:paramtypes", [PopupService,
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dateinputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1642521990,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -9,19 +9,22 @@ import { domContainerFactory as containerFactory } from '../../util';
|
|
|
9
9
|
var div = containerFactory('div');
|
|
10
10
|
var ul = containerFactory('ul');
|
|
11
11
|
var li = containerFactory('li');
|
|
12
|
+
var span = containerFactory('span');
|
|
13
|
+
var listTitle = function () { return span('hour', 'k-title k-timeselector-title'); };
|
|
14
|
+
var ɵ0 = listTitle;
|
|
12
15
|
var listItem = function () { return li('<span>02</span>', 'k-item'); };
|
|
13
|
-
var ɵ
|
|
16
|
+
var ɵ1 = listItem;
|
|
14
17
|
var list = function () { return ul([listItem()], 'k-reset'); };
|
|
15
|
-
var ɵ
|
|
16
|
-
var scrollable = function () { return (div([list()], 'k-time-container k-content k-scrollable')); };
|
|
17
|
-
var ɵ
|
|
18
|
+
var ɵ2 = list;
|
|
19
|
+
var scrollable = function () { return (div([list()], 'k-time-container k-flex k-content k-calendar-content k-scrollable')); };
|
|
20
|
+
var ɵ3 = scrollable;
|
|
18
21
|
var timeListWrapper = function () {
|
|
19
22
|
if (!isDocumentAvailable()) {
|
|
20
23
|
return null;
|
|
21
24
|
}
|
|
22
|
-
return div([div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
25
|
+
return div([listTitle(), div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
23
26
|
};
|
|
24
|
-
var ɵ
|
|
27
|
+
var ɵ4 = timeListWrapper;
|
|
25
28
|
var TIMELIST_WRAPPER = timeListWrapper();
|
|
26
29
|
/**
|
|
27
30
|
* @hidden
|
|
@@ -42,7 +45,8 @@ var TimePickerDOMService = /** @class */ (function () {
|
|
|
42
45
|
var listContainer = container && container.querySelector('.k-time-list-container');
|
|
43
46
|
var hostContainer = listContainer || document.body;
|
|
44
47
|
var wrapper = hostContainer.appendChild(TIMELIST_WRAPPER);
|
|
45
|
-
this.
|
|
48
|
+
this.timeListTitleHeight = wrapper.querySelector('.k-timeselector-title').getBoundingClientRect().height;
|
|
49
|
+
this.timeListHeight = wrapper.getBoundingClientRect().height;
|
|
46
50
|
this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
|
|
47
51
|
hostContainer.removeChild(wrapper);
|
|
48
52
|
};
|
|
@@ -58,4 +62,4 @@ var TimePickerDOMService = /** @class */ (function () {
|
|
|
58
62
|
return TimePickerDOMService;
|
|
59
63
|
}());
|
|
60
64
|
export { TimePickerDOMService };
|
|
61
|
-
export { ɵ0, ɵ1, ɵ2, ɵ3 };
|
|
65
|
+
export { ɵ0, ɵ1, ɵ2, ɵ3, ɵ4 };
|