@progress/kendo-angular-dateinputs 13.0.0-develop.9 → 13.0.0
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/datepicker/datepicker.component.d.ts +1 -1
- package/daterange/date-range-popup.component.d.ts +2 -3
- package/datetimepicker/datetimepicker.component.d.ts +1 -5
- package/esm2020/datepicker/datepicker.component.mjs +26 -21
- package/esm2020/daterange/date-range-popup.component.mjs +16 -11
- package/esm2020/daterange/date-range.service.mjs +2 -2
- package/esm2020/datetimepicker/datetimepicker.component.mjs +22 -22
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/timepicker/timepicker.component.mjs +22 -17
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +103 -75
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +90 -75
- package/package.json +11 -11
- package/timepicker/timepicker.component.d.ts +1 -1
|
@@ -598,7 +598,7 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnInit
|
|
|
598
598
|
* @hidden
|
|
599
599
|
*/
|
|
600
600
|
get appendTo(): ViewContainerRef;
|
|
601
|
-
get
|
|
601
|
+
get dateInput(): DateInputComponent;
|
|
602
602
|
get calendar(): any;
|
|
603
603
|
/**
|
|
604
604
|
* @hidden
|
|
@@ -37,7 +37,6 @@ import * as i0 from "@angular/core";
|
|
|
37
37
|
export declare class DateRangePopupComponent implements OnInit, OnDestroy {
|
|
38
38
|
private popupService;
|
|
39
39
|
private dateRangeService;
|
|
40
|
-
private ref;
|
|
41
40
|
private zone;
|
|
42
41
|
private renderer;
|
|
43
42
|
localization: LocalizationService;
|
|
@@ -180,7 +179,7 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
|
|
|
180
179
|
private _calendar;
|
|
181
180
|
private _show;
|
|
182
181
|
private windowSize;
|
|
183
|
-
constructor(popupService: PopupService, dateRangeService: DateRangeService,
|
|
182
|
+
constructor(popupService: PopupService, dateRangeService: DateRangeService, zone: NgZone, renderer: Renderer2, localization: LocalizationService, cdr: ChangeDetectorRef, rtl: boolean);
|
|
184
183
|
ngOnInit(): void;
|
|
185
184
|
ngAfterViewInit(): void;
|
|
186
185
|
ngOnDestroy(): void;
|
|
@@ -243,6 +242,6 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
|
|
|
243
242
|
private toggleDateRange;
|
|
244
243
|
private toggleActionSheet;
|
|
245
244
|
private updateActionSheetAdaptiveAppearance;
|
|
246
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupComponent, [null, null, null, null, null, null,
|
|
245
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupComponent, [null, null, null, null, null, null, { optional: true; }]>;
|
|
247
246
|
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePopupComponent, "kendo-daterange-popup", ["kendo-daterange-popup"], { "animate": "animate"; "anchor": "anchor"; "anchorAlign": "anchorAlign"; "appendTo": "appendTo"; "collision": "collision"; "popupAlign": "popupAlign"; "margin": "margin"; "adaptiveMode": "adaptiveMode"; "title": "title"; "subtitle": "subtitle"; }, { "open": "open"; "close": "close"; "onBlur": "blur"; "onFocus": "focus"; "cancel": "cancel"; }, ["contentTemplate", "contentCalendar"], never>;
|
|
248
247
|
}
|
|
@@ -71,11 +71,7 @@ export declare class DateTimePickerComponent implements OnInit, OnChanges, After
|
|
|
71
71
|
/**
|
|
72
72
|
* @hidden
|
|
73
73
|
*/
|
|
74
|
-
get
|
|
75
|
-
/**
|
|
76
|
-
* @hidden
|
|
77
|
-
*/
|
|
78
|
-
get inputElement(): HTMLElement;
|
|
74
|
+
get dateInput(): DateInputComponent;
|
|
79
75
|
/**
|
|
80
76
|
* @hidden
|
|
81
77
|
*/
|
|
@@ -550,7 +550,7 @@ export class DatePickerComponent {
|
|
|
550
550
|
* Used by the TextBoxContainer to determine if the component is empty.
|
|
551
551
|
*/
|
|
552
552
|
isEmpty() {
|
|
553
|
-
return !this.value && this.
|
|
553
|
+
return !this.value && this.dateInput.isEmpty();
|
|
554
554
|
}
|
|
555
555
|
/**
|
|
556
556
|
* @hidden
|
|
@@ -583,6 +583,9 @@ export class DatePickerComponent {
|
|
|
583
583
|
this.incompleteValidator = this.incompleteDateValidation ? incompleteDateValidator() : noop;
|
|
584
584
|
this.onValidatorChange();
|
|
585
585
|
}
|
|
586
|
+
if (!this.focusableId || changes.focusableId) {
|
|
587
|
+
this.focusableId = this.dateInput?.focusableId;
|
|
588
|
+
}
|
|
586
589
|
}
|
|
587
590
|
/**
|
|
588
591
|
* @hidden
|
|
@@ -612,9 +615,9 @@ export class DatePickerComponent {
|
|
|
612
615
|
this.verifyValue(value);
|
|
613
616
|
this.value = cloneDate(value);
|
|
614
617
|
this.cdr.markForCheck();
|
|
615
|
-
if (!value && this.
|
|
616
|
-
this.
|
|
617
|
-
this.
|
|
618
|
+
if (!value && this.dateInput) {
|
|
619
|
+
this.dateInput.placeholder = this.placeholder;
|
|
620
|
+
this.dateInput.writeValue(value);
|
|
618
621
|
}
|
|
619
622
|
}
|
|
620
623
|
/**
|
|
@@ -640,7 +643,7 @@ export class DatePickerComponent {
|
|
|
640
643
|
* @hidden
|
|
641
644
|
*/
|
|
642
645
|
validate(control) {
|
|
643
|
-
return this.minValidateFn(control) || this.maxValidateFn(control) || this.disabledDatesValidateFn(control) || this.incompleteValidator(control, this.
|
|
646
|
+
return this.minValidateFn(control) || this.maxValidateFn(control) || this.disabledDatesValidateFn(control) || this.incompleteValidator(control, this.dateInput && this.dateInput.isDateIncomplete);
|
|
644
647
|
}
|
|
645
648
|
/**
|
|
646
649
|
* @hidden
|
|
@@ -677,13 +680,13 @@ export class DatePickerComponent {
|
|
|
677
680
|
* ```
|
|
678
681
|
*/
|
|
679
682
|
focus() {
|
|
680
|
-
this.
|
|
683
|
+
this.dateInput.focus();
|
|
681
684
|
}
|
|
682
685
|
/**
|
|
683
686
|
* Blurs the DatePicker component.
|
|
684
687
|
*/
|
|
685
688
|
blur() {
|
|
686
|
-
(this.calendar || this.
|
|
689
|
+
(this.calendar || this.dateInput)['blur']();
|
|
687
690
|
}
|
|
688
691
|
/**
|
|
689
692
|
* Toggles the visibility of the popup or actionSheet.
|
|
@@ -745,7 +748,7 @@ export class DatePickerComponent {
|
|
|
745
748
|
* @hidden
|
|
746
749
|
*/
|
|
747
750
|
handleInputChange(value) {
|
|
748
|
-
this.handleChange(this.
|
|
751
|
+
this.handleChange(this.dateInput.formatSections['time'] ? value : this.mergeTime(value));
|
|
749
752
|
}
|
|
750
753
|
/**
|
|
751
754
|
* @hidden
|
|
@@ -767,7 +770,7 @@ export class DatePickerComponent {
|
|
|
767
770
|
}
|
|
768
771
|
return appendTo === 'component' ? this.container : appendTo;
|
|
769
772
|
}
|
|
770
|
-
get
|
|
773
|
+
get dateInput() {
|
|
771
774
|
return this.pickerService.input;
|
|
772
775
|
}
|
|
773
776
|
get calendar() {
|
|
@@ -824,7 +827,7 @@ export class DatePickerComponent {
|
|
|
824
827
|
}
|
|
825
828
|
}
|
|
826
829
|
if (keyCode === Keys.Tab && this.show && this.calendar.isActive && isTabExitingCalendar(this.calendarType, target, shiftKey)) {
|
|
827
|
-
this.
|
|
830
|
+
this.dateInput.focus();
|
|
828
831
|
this.show = false;
|
|
829
832
|
}
|
|
830
833
|
}
|
|
@@ -857,7 +860,7 @@ export class DatePickerComponent {
|
|
|
857
860
|
});
|
|
858
861
|
this.setAriaActiveDescendant();
|
|
859
862
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
860
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
863
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
861
864
|
this.subscription = this.popupRef.popupAnchorViewportLeave.subscribe(() => this.show = false);
|
|
862
865
|
}
|
|
863
866
|
else {
|
|
@@ -865,8 +868,8 @@ export class DatePickerComponent {
|
|
|
865
868
|
this.popupRef = null;
|
|
866
869
|
this.subscription.unsubscribe();
|
|
867
870
|
this.ariaActiveDescendantSubscription.unsubscribe();
|
|
868
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
869
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
871
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
872
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant);
|
|
870
873
|
this.cdr.detectChanges();
|
|
871
874
|
}
|
|
872
875
|
}
|
|
@@ -879,13 +882,13 @@ export class DatePickerComponent {
|
|
|
879
882
|
this.updateActionSheetAdaptiveAppearance();
|
|
880
883
|
this.setAriaActiveDescendant();
|
|
881
884
|
this.actionSheet.element.nativeElement.setAttribute('id', this.popupUID);
|
|
882
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
885
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
883
886
|
}
|
|
884
887
|
else if (!show && this.isOpen) {
|
|
885
888
|
this.actionSheet.toggle();
|
|
886
889
|
this.ariaActiveDescendantSubscription.unsubscribe();
|
|
887
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
888
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
890
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant);
|
|
891
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
889
892
|
}
|
|
890
893
|
this._show = show;
|
|
891
894
|
}
|
|
@@ -912,13 +915,13 @@ export class DatePickerComponent {
|
|
|
912
915
|
const focusedCellChangeEvent = this.calendar.type === 'infinite' ?
|
|
913
916
|
this.calendar.monthView.focusedCellChange :
|
|
914
917
|
this.calendar.multiViewCalendar.viewList.focusedCellChange;
|
|
915
|
-
this.ariaActiveDescendantSubscription = focusedCellChangeEvent.subscribe((id) => this.renderer.setAttribute(this.inputElement, attributeNames.ariaActiveDescendant, id));
|
|
918
|
+
this.ariaActiveDescendantSubscription = focusedCellChangeEvent.subscribe((id) => this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant, id));
|
|
916
919
|
}
|
|
917
920
|
focusInput() {
|
|
918
921
|
if (this.touchEnabled) {
|
|
919
922
|
return;
|
|
920
923
|
}
|
|
921
|
-
this.
|
|
924
|
+
this.dateInput.focus();
|
|
922
925
|
}
|
|
923
926
|
toggleFocus() {
|
|
924
927
|
if (!this.isActive) {
|
|
@@ -933,9 +936,9 @@ export class DatePickerComponent {
|
|
|
933
936
|
}
|
|
934
937
|
}
|
|
935
938
|
else if (!this.touchEnabled) {
|
|
936
|
-
this.
|
|
939
|
+
this.dateInput.focus();
|
|
937
940
|
}
|
|
938
|
-
else if (!this.
|
|
941
|
+
else if (!this.dateInput.isActive) {
|
|
939
942
|
this.handleBlur();
|
|
940
943
|
}
|
|
941
944
|
}
|
|
@@ -983,7 +986,7 @@ export class DatePickerComponent {
|
|
|
983
986
|
const currentTarget = args && currentFocusTarget(args);
|
|
984
987
|
const target = args && args.target;
|
|
985
988
|
const isInsideActionSheet = this.actionSheet && (this.actionSheet.element.nativeElement.contains(target) || this.actionSheet.element.nativeElement.contains(currentTarget));
|
|
986
|
-
if (currentTarget && (this.
|
|
989
|
+
if (currentTarget && (this.dateInput.containsElement(currentTarget) ||
|
|
987
990
|
(this.calendar && this.calendar.containsElement(currentTarget)) || isInsideActionSheet)) {
|
|
988
991
|
return;
|
|
989
992
|
}
|
|
@@ -1118,6 +1121,7 @@ DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
1118
1121
|
}"
|
|
1119
1122
|
[scope]="this"
|
|
1120
1123
|
(collapse)="handleActionSheetCollapse()"
|
|
1124
|
+
[titleId]="calendar?.headerId"
|
|
1121
1125
|
>
|
|
1122
1126
|
<ng-template kendoActionSheetTemplate>
|
|
1123
1127
|
<div class="k-actionsheet-titlebar">
|
|
@@ -1282,6 +1286,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1282
1286
|
}"
|
|
1283
1287
|
[scope]="this"
|
|
1284
1288
|
(collapse)="handleActionSheetCollapse()"
|
|
1289
|
+
[titleId]="calendar?.headerId"
|
|
1285
1290
|
>
|
|
1286
1291
|
<ng-template kendoActionSheetTemplate>
|
|
1287
1292
|
<div class="k-actionsheet-titlebar">
|
|
@@ -48,10 +48,9 @@ import * as i10 from "@angular/common";
|
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
export class DateRangePopupComponent {
|
|
51
|
-
constructor(popupService, dateRangeService,
|
|
51
|
+
constructor(popupService, dateRangeService, zone, renderer, localization, cdr, rtl) {
|
|
52
52
|
this.popupService = popupService;
|
|
53
53
|
this.dateRangeService = dateRangeService;
|
|
54
|
-
this.ref = ref;
|
|
55
54
|
this.zone = zone;
|
|
56
55
|
this.renderer = renderer;
|
|
57
56
|
this.localization = localization;
|
|
@@ -194,8 +193,16 @@ export class DateRangePopupComponent {
|
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
195
|
ngAfterViewInit() {
|
|
197
|
-
this.calendarSubscriptions.add(this.contentCalendar.changes.subscribe((changes) =>
|
|
198
|
-
|
|
196
|
+
this.calendarSubscriptions.add(this.contentCalendar.changes.subscribe((changes) => {
|
|
197
|
+
this.calendar = changes.first;
|
|
198
|
+
this.actionSheet.titleId = changes.first?.headerId;
|
|
199
|
+
this.cdr.detectChanges();
|
|
200
|
+
}));
|
|
201
|
+
this.calendarSubscriptions.add(this.viewCalendar.changes.subscribe((changes) => {
|
|
202
|
+
this.calendar = changes.first;
|
|
203
|
+
this.actionSheet.titleId = changes.first?.headerId;
|
|
204
|
+
this.cdr.detectChanges();
|
|
205
|
+
}));
|
|
199
206
|
if (isWindowAvailable()) {
|
|
200
207
|
this.zone.runOutsideAngular(() => this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this)));
|
|
201
208
|
}
|
|
@@ -226,7 +233,7 @@ export class DateRangePopupComponent {
|
|
|
226
233
|
this.activateSubscription.unsubscribe();
|
|
227
234
|
}
|
|
228
235
|
this.show = true;
|
|
229
|
-
this.
|
|
236
|
+
this.cdr.markForCheck();
|
|
230
237
|
this.zone.runOutsideAngular(() => {
|
|
231
238
|
this.activateSubscription = merge(this.contentCalendar.changes, this.viewCalendar.changes)
|
|
232
239
|
.pipe(filter(changes => changes && changes.first), map(changes => changes.first))
|
|
@@ -463,7 +470,7 @@ export class DateRangePopupComponent {
|
|
|
463
470
|
}
|
|
464
471
|
}
|
|
465
472
|
}
|
|
466
|
-
DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i1.PopupService }, { token: i2.DateRangeService }, { token: i0.
|
|
473
|
+
DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i1.PopupService }, { token: i2.DateRangeService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i3.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
467
474
|
DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: { animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", appendTo: "appendTo", collision: "collision", popupAlign: "popupAlign", margin: "margin", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle" }, outputs: { open: "open", close: "close", onBlur: "blur", onFocus: "focus", cancel: "cancel" }, providers: [
|
|
468
475
|
LocalizationService,
|
|
469
476
|
{
|
|
@@ -490,7 +497,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
490
497
|
<kendo-multiviewcalendar kendoDateRangeSelection (onClosePopup)="closePopup($event)" (onTabPress)="handleTab($event)" (onShiftTabPress)="handleShiftTab($event)"></kendo-multiviewcalendar>
|
|
491
498
|
</ng-template>
|
|
492
499
|
|
|
493
|
-
<kendo-actionsheet
|
|
500
|
+
<kendo-actionsheet
|
|
494
501
|
#actionSheet
|
|
495
502
|
(overlayClick)="show=false"
|
|
496
503
|
(collapse)="onBlur.emit()"
|
|
@@ -527,7 +534,6 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
527
534
|
<kendo-multiviewcalendar
|
|
528
535
|
class="k-calendar-lg"
|
|
529
536
|
orientation="vertical"
|
|
530
|
-
#test
|
|
531
537
|
kendoDateRangeSelection
|
|
532
538
|
[shouldSetRange]="false">
|
|
533
539
|
</kendo-multiviewcalendar>
|
|
@@ -588,7 +594,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
588
594
|
<kendo-multiviewcalendar kendoDateRangeSelection (onClosePopup)="closePopup($event)" (onTabPress)="handleTab($event)" (onShiftTabPress)="handleShiftTab($event)"></kendo-multiviewcalendar>
|
|
589
595
|
</ng-template>
|
|
590
596
|
|
|
591
|
-
<kendo-actionsheet
|
|
597
|
+
<kendo-actionsheet
|
|
592
598
|
#actionSheet
|
|
593
599
|
(overlayClick)="show=false"
|
|
594
600
|
(collapse)="onBlur.emit()"
|
|
@@ -625,7 +631,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
625
631
|
<kendo-multiviewcalendar
|
|
626
632
|
class="k-calendar-lg"
|
|
627
633
|
orientation="vertical"
|
|
628
|
-
#test
|
|
629
634
|
kendoDateRangeSelection
|
|
630
635
|
[shouldSetRange]="false">
|
|
631
636
|
</kendo-multiviewcalendar>
|
|
@@ -655,7 +660,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
655
660
|
</kendo-actionsheet>
|
|
656
661
|
`
|
|
657
662
|
}]
|
|
658
|
-
}], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i2.DateRangeService }, { type: i0.
|
|
663
|
+
}], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i2.DateRangeService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i3.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
659
664
|
type: Optional
|
|
660
665
|
}, {
|
|
661
666
|
type: Inject,
|
|
@@ -82,14 +82,14 @@ export class DateRangeService {
|
|
|
82
82
|
* Gets the start input element.
|
|
83
83
|
*/
|
|
84
84
|
get inputStartElement() {
|
|
85
|
-
return this.startInput$.value.
|
|
85
|
+
return this.startInput$.value.inputElement;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* @hidden
|
|
89
89
|
* Gets the end input element.
|
|
90
90
|
*/
|
|
91
91
|
get inputEndElement() {
|
|
92
|
-
return this.endInput$.value.
|
|
92
|
+
return this.endInput$.value.inputElement;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Activates the registered `DateRangePopup` component.
|
|
@@ -265,15 +265,9 @@ export class DateTimePickerComponent {
|
|
|
265
265
|
/**
|
|
266
266
|
* @hidden
|
|
267
267
|
*/
|
|
268
|
-
get
|
|
268
|
+
get dateInput() {
|
|
269
269
|
return this.pickerService.input;
|
|
270
270
|
}
|
|
271
|
-
/**
|
|
272
|
-
* @hidden
|
|
273
|
-
*/
|
|
274
|
-
get inputElement() {
|
|
275
|
-
return this.wrapper.nativeElement.querySelector('input');
|
|
276
|
-
}
|
|
277
271
|
/**
|
|
278
272
|
* @hidden
|
|
279
273
|
*/
|
|
@@ -626,6 +620,9 @@ export class DateTimePickerComponent {
|
|
|
626
620
|
this.incompleteValidator = this.incompleteDateValidation ? incompleteDateValidator() : noop;
|
|
627
621
|
this.onValidatorChange();
|
|
628
622
|
}
|
|
623
|
+
if (!this.focusableId || changes['focusableId']) {
|
|
624
|
+
this.focusableId = this.dateInput?.focusableId;
|
|
625
|
+
}
|
|
629
626
|
}
|
|
630
627
|
ngOnDestroy() {
|
|
631
628
|
if (this.isOpen) {
|
|
@@ -645,7 +642,7 @@ export class DateTimePickerComponent {
|
|
|
645
642
|
this.activeTabComponent.focus();
|
|
646
643
|
}
|
|
647
644
|
else {
|
|
648
|
-
this.
|
|
645
|
+
this.dateInput.focus();
|
|
649
646
|
}
|
|
650
647
|
}
|
|
651
648
|
/**
|
|
@@ -656,7 +653,7 @@ export class DateTimePickerComponent {
|
|
|
656
653
|
this.activeTabComponent.blur();
|
|
657
654
|
}
|
|
658
655
|
else {
|
|
659
|
-
this.
|
|
656
|
+
this.dateInput.blur();
|
|
660
657
|
}
|
|
661
658
|
}
|
|
662
659
|
/**
|
|
@@ -708,7 +705,7 @@ export class DateTimePickerComponent {
|
|
|
708
705
|
* @hidden
|
|
709
706
|
*/
|
|
710
707
|
validate(control) {
|
|
711
|
-
return this.minValidateFn(control) || this.maxValidateFn(control) || this.disabledDatesValidateFn(control) || this.incompleteValidator(control, this.
|
|
708
|
+
return this.minValidateFn(control) || this.maxValidateFn(control) || this.disabledDatesValidateFn(control) || this.incompleteValidator(control, this.dateInput && this.dateInput.isDateIncomplete);
|
|
712
709
|
}
|
|
713
710
|
/**
|
|
714
711
|
* @hidden
|
|
@@ -722,7 +719,7 @@ export class DateTimePickerComponent {
|
|
|
722
719
|
* Used by the TextBoxContainer to determine if the floating label will render in the input.
|
|
723
720
|
*/
|
|
724
721
|
isEmpty() {
|
|
725
|
-
return !isPresent(this.value) && this.
|
|
722
|
+
return !isPresent(this.value) && this.dateInput.isEmpty();
|
|
726
723
|
}
|
|
727
724
|
/**
|
|
728
725
|
* @hidden
|
|
@@ -795,7 +792,7 @@ export class DateTimePickerComponent {
|
|
|
795
792
|
return;
|
|
796
793
|
}
|
|
797
794
|
if (this.activeTab === 'time') {
|
|
798
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
795
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant);
|
|
799
796
|
}
|
|
800
797
|
this.activeTabComponent.focus();
|
|
801
798
|
}
|
|
@@ -940,7 +937,6 @@ export class DateTimePickerComponent {
|
|
|
940
937
|
this.cdr.markForCheck();
|
|
941
938
|
// Reset tabs after actionsheet is collapsed, otherwise the tab change can be seen during the animation
|
|
942
939
|
this.resetActiveTab();
|
|
943
|
-
this.input.focus();
|
|
944
940
|
}
|
|
945
941
|
/**
|
|
946
942
|
* @hidden
|
|
@@ -972,14 +968,14 @@ export class DateTimePickerComponent {
|
|
|
972
968
|
this.actionSheet.toggle();
|
|
973
969
|
this.updateActionSheetAdaptiveAppearance();
|
|
974
970
|
this.renderer.setAttribute(this.actionSheet.element.nativeElement, 'id', this.popupUID);
|
|
975
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
971
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
976
972
|
this.setAriaActiveDescendant();
|
|
977
973
|
}
|
|
978
974
|
else if (isPresent(show) && !show && this.isOpen) {
|
|
979
975
|
this.actionSheet.toggle();
|
|
980
976
|
this.ariaActiveDescendantSubscription.unsubscribe();
|
|
981
|
-
this.renderer.removeAttribute(this.
|
|
982
|
-
this.renderer.removeAttribute(this.
|
|
977
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant);
|
|
978
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
983
979
|
}
|
|
984
980
|
}
|
|
985
981
|
updateActionSheetAdaptiveAppearance() {
|
|
@@ -1094,9 +1090,9 @@ export class DateTimePickerComponent {
|
|
|
1094
1090
|
this.activeTabComponent.focus();
|
|
1095
1091
|
}
|
|
1096
1092
|
else if (!this.touchEnabled) {
|
|
1097
|
-
this.
|
|
1093
|
+
this.dateInput.focus();
|
|
1098
1094
|
}
|
|
1099
|
-
else if (!this.
|
|
1095
|
+
else if (!this.dateInput.isActive) {
|
|
1100
1096
|
this.handleBlur();
|
|
1101
1097
|
}
|
|
1102
1098
|
}
|
|
@@ -1115,7 +1111,7 @@ export class DateTimePickerComponent {
|
|
|
1115
1111
|
popupAlign: { vertical: 'top', horizontal: direction }
|
|
1116
1112
|
});
|
|
1117
1113
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
1118
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
1114
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
1119
1115
|
this.setAriaActiveDescendant();
|
|
1120
1116
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.handleCancel());
|
|
1121
1117
|
if (this.calendar.type === 'infinite') {
|
|
@@ -1132,15 +1128,15 @@ export class DateTimePickerComponent {
|
|
|
1132
1128
|
const focusedCellChangeEvent = this.calendar.type === 'infinite' ?
|
|
1133
1129
|
this.calendar.monthView.focusedCellChange :
|
|
1134
1130
|
this.calendar.multiViewCalendar.viewList.focusedCellChange;
|
|
1135
|
-
this.ariaActiveDescendantSubscription = focusedCellChangeEvent.subscribe((id) => this.renderer.setAttribute(this.
|
|
1131
|
+
this.ariaActiveDescendantSubscription = focusedCellChangeEvent.subscribe((id) => this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant, id));
|
|
1136
1132
|
}
|
|
1137
1133
|
closePopup() {
|
|
1138
1134
|
if (!this.isOpen) {
|
|
1139
1135
|
return;
|
|
1140
1136
|
}
|
|
1141
1137
|
this.ariaActiveDescendantSubscription.unsubscribe();
|
|
1142
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
1143
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
1138
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
1139
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaActiveDescendant);
|
|
1144
1140
|
this.popupRef.close();
|
|
1145
1141
|
this.popupRef = null;
|
|
1146
1142
|
}
|
|
@@ -1360,6 +1356,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1360
1356
|
#actionSheet
|
|
1361
1357
|
(overlayClick)="toggleDateTime(false)"
|
|
1362
1358
|
(collapse)="handleActionSheetCollapse()"
|
|
1359
|
+
[titleId]="calendar?.headerId"
|
|
1363
1360
|
>
|
|
1364
1361
|
<ng-template kendoActionSheetTemplate>
|
|
1365
1362
|
<div class="k-actionsheet-titlebar">
|
|
@@ -1469,6 +1466,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1469
1466
|
>
|
|
1470
1467
|
<div class="k-datetime-calendar-wrap">
|
|
1471
1468
|
<kendo-calendar
|
|
1469
|
+
#calendar
|
|
1472
1470
|
[ngClass]="{'k-calendar-lg': isAdaptive}"
|
|
1473
1471
|
[focusedDate]="focusedDate"
|
|
1474
1472
|
[(value)]="calendarValue"
|
|
@@ -1722,6 +1720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1722
1720
|
#actionSheet
|
|
1723
1721
|
(overlayClick)="toggleDateTime(false)"
|
|
1724
1722
|
(collapse)="handleActionSheetCollapse()"
|
|
1723
|
+
[titleId]="calendar?.headerId"
|
|
1725
1724
|
>
|
|
1726
1725
|
<ng-template kendoActionSheetTemplate>
|
|
1727
1726
|
<div class="k-actionsheet-titlebar">
|
|
@@ -1831,6 +1830,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1831
1830
|
>
|
|
1832
1831
|
<div class="k-datetime-calendar-wrap">
|
|
1833
1832
|
<kendo-calendar
|
|
1833
|
+
#calendar
|
|
1834
1834
|
[ngClass]="{'k-calendar-lg': isAdaptive}"
|
|
1835
1835
|
[focusedDate]="focusedDate"
|
|
1836
1836
|
[(value)]="calendarValue"
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dateinputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '13.0.0
|
|
12
|
+
publishDate: 1686055688,
|
|
13
|
+
version: '13.0.0',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -443,7 +443,7 @@ export class TimePickerComponent {
|
|
|
443
443
|
this.toggleTimeSelector(show);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
get
|
|
446
|
+
get dateInput() {
|
|
447
447
|
return this.pickerService.input;
|
|
448
448
|
}
|
|
449
449
|
get timeSelector() {
|
|
@@ -457,7 +457,7 @@ export class TimePickerComponent {
|
|
|
457
457
|
* Used by the TextBoxContainer to determine if the component is empty
|
|
458
458
|
*/
|
|
459
459
|
isEmpty() {
|
|
460
|
-
return !this.value && this.
|
|
460
|
+
return !this.value && this.dateInput.isEmpty();
|
|
461
461
|
}
|
|
462
462
|
/**
|
|
463
463
|
* @hidden
|
|
@@ -492,6 +492,9 @@ export class TimePickerComponent {
|
|
|
492
492
|
if (changes.format) {
|
|
493
493
|
this.verifyFormat();
|
|
494
494
|
}
|
|
495
|
+
if (!this.focusableId || changes.focusableId) {
|
|
496
|
+
this.focusableId = this.dateInput?.focusableId;
|
|
497
|
+
}
|
|
495
498
|
}
|
|
496
499
|
/**
|
|
497
500
|
* @hidden
|
|
@@ -537,9 +540,9 @@ export class TimePickerComponent {
|
|
|
537
540
|
this.verifyValue(value);
|
|
538
541
|
this.value = cloneDate(value);
|
|
539
542
|
this.cdr.markForCheck();
|
|
540
|
-
if (!value && this.
|
|
541
|
-
this.
|
|
542
|
-
this.
|
|
543
|
+
if (!value && this.dateInput) {
|
|
544
|
+
this.dateInput.placeholder = this.placeholder;
|
|
545
|
+
this.dateInput.writeValue(value);
|
|
543
546
|
}
|
|
544
547
|
}
|
|
545
548
|
/**
|
|
@@ -565,7 +568,7 @@ export class TimePickerComponent {
|
|
|
565
568
|
* @hidden
|
|
566
569
|
*/
|
|
567
570
|
validate(control) {
|
|
568
|
-
return this.timeRangeValidateFn(control) || this.incompleteValidator(control, this.
|
|
571
|
+
return this.timeRangeValidateFn(control) || this.incompleteValidator(control, this.dateInput && this.dateInput.isDateIncomplete);
|
|
569
572
|
}
|
|
570
573
|
/**
|
|
571
574
|
* @hidden
|
|
@@ -589,13 +592,13 @@ export class TimePickerComponent {
|
|
|
589
592
|
* ```
|
|
590
593
|
*/
|
|
591
594
|
focus() {
|
|
592
|
-
this.
|
|
595
|
+
this.dateInput.focus();
|
|
593
596
|
}
|
|
594
597
|
/**
|
|
595
598
|
* Blurs the TimePicker component.
|
|
596
599
|
*/
|
|
597
600
|
blur() {
|
|
598
|
-
(this.timeSelector || this.
|
|
601
|
+
(this.timeSelector || this.dateInput)['blur']();
|
|
599
602
|
}
|
|
600
603
|
/**
|
|
601
604
|
* Toggles the visibility of the popup or actionSheet.
|
|
@@ -668,7 +671,7 @@ export class TimePickerComponent {
|
|
|
668
671
|
* @hidden
|
|
669
672
|
*/
|
|
670
673
|
handleInputChange(value) {
|
|
671
|
-
const val = this.
|
|
674
|
+
const val = this.dateInput.formatSections['date'] ? value : this.mergeTime(value);
|
|
672
675
|
this.handleChange(val);
|
|
673
676
|
}
|
|
674
677
|
/**
|
|
@@ -779,12 +782,12 @@ export class TimePickerComponent {
|
|
|
779
782
|
this.actionSheet.toggle();
|
|
780
783
|
this.updateActionSheetAdaptiveAppearance();
|
|
781
784
|
this.renderer.setAttribute(this.actionSheet.element.nativeElement, 'id', this.popupUID);
|
|
782
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
785
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
783
786
|
}
|
|
784
787
|
else if (!show && this.isOpen) {
|
|
785
788
|
// Need to disable the pointer events to avoid triggering focus on the timelist when acionsheet close down animation starts
|
|
786
789
|
this.renderer.setStyle(this.timeSelector.element.nativeElement, 'pointer-events', 'none');
|
|
787
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
790
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
788
791
|
this.actionSheet.toggle();
|
|
789
792
|
}
|
|
790
793
|
this._show = show;
|
|
@@ -808,13 +811,13 @@ export class TimePickerComponent {
|
|
|
808
811
|
positionMode: 'absolute'
|
|
809
812
|
});
|
|
810
813
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
811
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
814
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
812
815
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.show = false);
|
|
813
816
|
}
|
|
814
817
|
else {
|
|
815
818
|
this.popupRef.close();
|
|
816
819
|
this.popupRef = null;
|
|
817
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
820
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
818
821
|
}
|
|
819
822
|
}
|
|
820
823
|
updateActionSheetAdaptiveAppearance() {
|
|
@@ -840,7 +843,7 @@ export class TimePickerComponent {
|
|
|
840
843
|
if (this.touchEnabled) {
|
|
841
844
|
return;
|
|
842
845
|
}
|
|
843
|
-
this.
|
|
846
|
+
this.dateInput.focus();
|
|
844
847
|
}
|
|
845
848
|
toggleFocus() {
|
|
846
849
|
if (!this.isActive) {
|
|
@@ -855,9 +858,9 @@ export class TimePickerComponent {
|
|
|
855
858
|
}
|
|
856
859
|
}
|
|
857
860
|
else if (!this.touchEnabled) {
|
|
858
|
-
this.
|
|
861
|
+
this.dateInput.focus();
|
|
859
862
|
}
|
|
860
|
-
else if (!this.
|
|
863
|
+
else if (!this.dateInput.isActive) {
|
|
861
864
|
this.handleBlur();
|
|
862
865
|
}
|
|
863
866
|
}
|
|
@@ -906,7 +909,7 @@ export class TimePickerComponent {
|
|
|
906
909
|
const currentTarget = args && currentFocusTarget(args); // relatedTarget || activeElement
|
|
907
910
|
const target = args && args.target;
|
|
908
911
|
const isInsideActionSheet = this.actionSheet && (this.actionSheet.element.nativeElement.contains(target) || this.actionSheet.element.nativeElement.contains(currentTarget));
|
|
909
|
-
if (currentTarget && (this.
|
|
912
|
+
if (currentTarget && (this.dateInput.containsElement(currentTarget) ||
|
|
910
913
|
(this.timeSelector && this.timeSelector.containsElement(currentTarget)) || isInsideActionSheet)) {
|
|
911
914
|
return;
|
|
912
915
|
}
|
|
@@ -1053,6 +1056,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
1053
1056
|
#actionSheet
|
|
1054
1057
|
(overlayClick)="show=false"
|
|
1055
1058
|
(collapse)="handleActionSheetCollapse()"
|
|
1059
|
+
[titleId]="focusableId"
|
|
1056
1060
|
>
|
|
1057
1061
|
<ng-template kendoActionSheetTemplate>
|
|
1058
1062
|
<div class="k-actionsheet-titlebar">
|
|
@@ -1255,6 +1259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1255
1259
|
#actionSheet
|
|
1256
1260
|
(overlayClick)="show=false"
|
|
1257
1261
|
(collapse)="handleActionSheetCollapse()"
|
|
1262
|
+
[titleId]="focusableId"
|
|
1258
1263
|
>
|
|
1259
1264
|
<ng-template kendoActionSheetTemplate>
|
|
1260
1265
|
<div class="k-actionsheet-titlebar">
|