@progress/kendo-angular-dateinputs 11.4.0-develop.1 → 11.4.0-develop.11
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 +18 -1
- package/common/adaptive.module.d.ts +18 -0
- package/datepicker/datepicker.component.d.ts +57 -6
- package/datepicker/datepicker.module.d.ts +2 -1
- package/daterange/date-range-popup.component.d.ts +58 -7
- package/daterange/date-range-selection.directive.d.ts +12 -2
- package/daterange/date-range.module.d.ts +9 -6
- package/daterange/localization/daterange-popup-custom-messages.component.d.ts +17 -0
- package/daterange/localization/daterange-popup-localized-messages.directive.d.ts +16 -0
- package/daterange/localization/messages.d.ts +29 -0
- package/datetimepicker/datetimepicker.component.d.ts +58 -5
- package/datetimepicker/datetimepicker.module.d.ts +2 -1
- package/esm2020/calendar/calendar.component.mjs +34 -2
- package/esm2020/calendar/multiview-calendar.component.mjs +2 -1
- package/esm2020/common/adaptive.module.mjs +41 -0
- package/esm2020/datepicker/datepicker.component.mjs +271 -48
- package/esm2020/datepicker/datepicker.module.mjs +7 -3
- package/esm2020/daterange/date-range-popup.component.mjs +320 -17
- package/esm2020/daterange/date-range-selection.directive.mjs +27 -12
- package/esm2020/daterange/date-range.component.mjs +1 -1
- package/esm2020/daterange/date-range.module.mjs +16 -5
- package/esm2020/daterange/localization/daterange-popup-custom-messages.component.mjs +41 -0
- package/esm2020/daterange/localization/daterange-popup-localized-messages.directive.mjs +37 -0
- package/esm2020/daterange/localization/messages.mjs +29 -0
- package/esm2020/datetimepicker/datetimepicker.component.mjs +306 -49
- package/esm2020/datetimepicker/datetimepicker.module.mjs +7 -3
- package/esm2020/index.mjs +3 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/timepicker/services/dom.service.mjs +33 -7
- package/esm2020/timepicker/timepicker.component.mjs +279 -33
- package/esm2020/timepicker/timepicker.module.mjs +5 -2
- package/esm2020/timepicker/timeselector.component.mjs +7 -1
- package/esm2020/util.mjs +18 -0
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +1417 -175
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +1417 -175
- package/index.d.ts +4 -0
- package/package.json +11 -9
- package/timepicker/services/dom.service.d.ts +3 -0
- package/timepicker/timepicker.component.d.ts +52 -5
- package/timepicker/timepicker.module.d.ts +2 -1
- package/timepicker/timeselector.component.d.ts +7 -2
- package/util.d.ts +12 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, HostBinding, ViewChild, ElementRef, Input, isDevMode, TemplateRef, ChangeDetectorRef, Output, EventEmitter, NgZone, ViewContainerRef, forwardRef, ContentChild, Inject, ChangeDetectionStrategy, Renderer2 } from '@angular/core';
|
|
5
|
+
import { Component, HostBinding, ViewChild, ElementRef, Input, isDevMode, TemplateRef, ChangeDetectorRef, Output, EventEmitter, NgZone, ViewContainerRef, forwardRef, ContentChild, Inject, ChangeDetectionStrategy, Renderer2, } from '@angular/core';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
7
7
|
import { Subscription, fromEvent } from 'rxjs';
|
|
8
8
|
import { tap } from 'rxjs/operators';
|
|
@@ -16,7 +16,7 @@ import { packageMetadata } from '../package-metadata';
|
|
|
16
16
|
import { PickerService } from '../common/picker.service';
|
|
17
17
|
import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
|
|
18
18
|
import { attributeNames, isPresent } from '../common/utils';
|
|
19
|
-
import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable, getFillModeClass, getRoundedClass, getSizeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE } from '../util';
|
|
19
|
+
import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable, getFillModeClass, getRoundedClass, getSizeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE, windowSize } from '../util';
|
|
20
20
|
import { PreventableEvent } from '../preventable-event';
|
|
21
21
|
import { minValidator } from '../validators/min.validator';
|
|
22
22
|
import { maxValidator } from '../validators/max.validator';
|
|
@@ -32,7 +32,8 @@ import { CenturyCellTemplateDirective } from '../calendar/templates/century-cell
|
|
|
32
32
|
import { WeekNumberCellTemplateDirective } from '../calendar/templates/weeknumber-cell-template.directive';
|
|
33
33
|
import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title-template.directive';
|
|
34
34
|
import { incompleteDateValidator } from '../validators/incomplete-date.validator';
|
|
35
|
-
import { calendarIcon, clockIcon } from '@progress/kendo-svg-icons';
|
|
35
|
+
import { calendarIcon, clockIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
36
|
+
import { ActionSheetComponent } from '@progress/kendo-angular-navigation';
|
|
36
37
|
import * as i0 from "@angular/core";
|
|
37
38
|
import * as i1 from "@progress/kendo-angular-popup";
|
|
38
39
|
import * as i2 from "@progress/kendo-angular-intl";
|
|
@@ -41,13 +42,15 @@ import * as i4 from "@progress/kendo-angular-l10n";
|
|
|
41
42
|
import * as i5 from "../calendar/services/disabled-dates.service";
|
|
42
43
|
import * as i6 from "../dateinput/dateinput.component";
|
|
43
44
|
import * as i7 from "@progress/kendo-angular-icons";
|
|
44
|
-
import * as i8 from "
|
|
45
|
-
import * as i9 from "
|
|
46
|
-
import * as i10 from "
|
|
47
|
-
import * as i11 from "../
|
|
48
|
-
import * as i12 from "
|
|
49
|
-
import * as i13 from "
|
|
50
|
-
import * as i14 from "
|
|
45
|
+
import * as i8 from "@progress/kendo-angular-common";
|
|
46
|
+
import * as i9 from "@progress/kendo-angular-navigation";
|
|
47
|
+
import * as i10 from "@progress/kendo-angular-buttons";
|
|
48
|
+
import * as i11 from "../calendar/calendar.component";
|
|
49
|
+
import * as i12 from "../calendar/localization/calendar-custom-messages.component";
|
|
50
|
+
import * as i13 from "../timepicker/timeselector.component";
|
|
51
|
+
import * as i14 from "../timepicker/localization/timeselector-custom-messages.component";
|
|
52
|
+
import * as i15 from "./localization/localized-messages.directive";
|
|
53
|
+
import * as i16 from "@angular/common";
|
|
51
54
|
const timeFormatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PART.second}|${TIME_PART.dayperiod}|literal`);
|
|
52
55
|
const VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/integration-with-json/';
|
|
53
56
|
const MIN_MAX_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/date-time-limits/';
|
|
@@ -91,7 +94,8 @@ export class DateTimePickerComponent {
|
|
|
91
94
|
*/
|
|
92
95
|
this.twoDigitYearMax = TWO_DIGIT_YEAR_MAX;
|
|
93
96
|
/**
|
|
94
|
-
* Sets the title of the input element of the DateTimePicker
|
|
97
|
+
* Sets the title of the input element of the DateTimePicker and the title text rendered
|
|
98
|
+
* in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
|
|
95
99
|
*/
|
|
96
100
|
this.title = '';
|
|
97
101
|
/**
|
|
@@ -160,6 +164,10 @@ export class DateTimePickerComponent {
|
|
|
160
164
|
* Determines whether the built-in validation for incomplete dates is to be enforced when a form is being validated.
|
|
161
165
|
*/
|
|
162
166
|
this.incompleteDateValidation = false;
|
|
167
|
+
/**
|
|
168
|
+
* Enables or disables the adaptive mode. By default the adaptive rendering is disabled.
|
|
169
|
+
*/
|
|
170
|
+
this.adaptiveMode = 'none';
|
|
163
171
|
/**
|
|
164
172
|
* Fires each time the user selects a new value.
|
|
165
173
|
* ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
|
|
@@ -220,6 +228,10 @@ export class DateTimePickerComponent {
|
|
|
220
228
|
* @hidden
|
|
221
229
|
*/
|
|
222
230
|
this.calendarMax = lastMillisecondOfDate(MAX_DATE);
|
|
231
|
+
/**
|
|
232
|
+
* @hidden
|
|
233
|
+
*/
|
|
234
|
+
this.xIcon = xIcon;
|
|
223
235
|
this._popupSettings = { animate: true };
|
|
224
236
|
this._value = null;
|
|
225
237
|
this._format = DEFAULT_DATEINPUT_FORMAT;
|
|
@@ -340,6 +352,16 @@ export class DateTimePickerComponent {
|
|
|
340
352
|
get popupSettings() {
|
|
341
353
|
return this._popupSettings;
|
|
342
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* Sets the subtitle text rendered in the header of the popup(action sheet).
|
|
357
|
+
* Applicable only when [`AdaptiveMode` is set to `auto`](slug:api_dateinputs_adaptivemode).
|
|
358
|
+
*/
|
|
359
|
+
set subtitle(subtitle) {
|
|
360
|
+
this._subtitle = subtitle;
|
|
361
|
+
}
|
|
362
|
+
get subtitle() {
|
|
363
|
+
return this._subtitle || this.placeholder;
|
|
364
|
+
}
|
|
343
365
|
/**
|
|
344
366
|
* Specifies the smallest valid date.
|
|
345
367
|
* The Calendar will not display dates before this value.
|
|
@@ -375,10 +397,13 @@ export class DateTimePickerComponent {
|
|
|
375
397
|
return this._max;
|
|
376
398
|
}
|
|
377
399
|
/**
|
|
378
|
-
* Indicates whether the component is currently open.
|
|
400
|
+
* Indicates whether the component is currently open. That is when the popup or actionSheet is open.
|
|
379
401
|
*/
|
|
380
402
|
get isOpen() {
|
|
381
|
-
|
|
403
|
+
if (!this.isAdaptive) {
|
|
404
|
+
return isPresent(this.popupRef);
|
|
405
|
+
}
|
|
406
|
+
return this.actionSheet && this.actionSheet.expanded;
|
|
382
407
|
}
|
|
383
408
|
/**
|
|
384
409
|
* Indicates whether the component or its popup content is focused.
|
|
@@ -506,6 +531,34 @@ export class DateTimePickerComponent {
|
|
|
506
531
|
get disableTimeSelector() {
|
|
507
532
|
return this.activeTab !== 'time' && !this.timeSelector.isActive;
|
|
508
533
|
}
|
|
534
|
+
/**
|
|
535
|
+
* @hidden
|
|
536
|
+
*/
|
|
537
|
+
get isAdaptiveModeEnabled() {
|
|
538
|
+
return this.adaptiveMode === 'auto';
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* @hidden
|
|
542
|
+
*/
|
|
543
|
+
get isAdaptive() {
|
|
544
|
+
return this.isAdaptiveModeEnabled && this.windowSize !== 'large';
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* @hidden
|
|
548
|
+
*/
|
|
549
|
+
onResize() {
|
|
550
|
+
if (!this.isOpen || this.windowSize === windowSize()) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
;
|
|
554
|
+
if (this.actionSheet.expanded) {
|
|
555
|
+
this.toggleActionSheet(false);
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
this._togglePopup(false);
|
|
559
|
+
}
|
|
560
|
+
this.windowSize = windowSize();
|
|
561
|
+
}
|
|
509
562
|
get activeTabComponent() {
|
|
510
563
|
if (!this.isOpen) {
|
|
511
564
|
return;
|
|
@@ -536,11 +589,16 @@ export class DateTimePickerComponent {
|
|
|
536
589
|
this.subscriptions.add(this.localization.changes.subscribe(() => this.cdr.markForCheck()));
|
|
537
590
|
this.subscriptions.add(this.pickerService.dateCompletenessChange.subscribe(this.handleDateCompletenessChange.bind(this)));
|
|
538
591
|
if (isWindowAvailable()) {
|
|
539
|
-
this.subscriptions.add(this.ngZone.runOutsideAngular(() => fromEvent(window, 'blur').subscribe(
|
|
592
|
+
this.subscriptions.add(this.ngZone.runOutsideAngular(() => fromEvent(window, 'blur').subscribe(() => {
|
|
593
|
+
if (!this.isAdaptive) {
|
|
594
|
+
this.handleCancel();
|
|
595
|
+
}
|
|
596
|
+
})));
|
|
540
597
|
}
|
|
541
598
|
}
|
|
542
599
|
ngAfterViewInit() {
|
|
543
600
|
this.setComponentClasses();
|
|
601
|
+
this.renderer.setAttribute(this.actionSheet.element.nativeElement, 'style', '--kendo-actionsheet-height: 60vh; --kendo-actionsheet-max-height: none');
|
|
544
602
|
}
|
|
545
603
|
ngOnChanges(changes) {
|
|
546
604
|
if (isPresent(changes['min']) || isPresent(changes['max'])) {
|
|
@@ -587,7 +645,8 @@ export class DateTimePickerComponent {
|
|
|
587
645
|
}
|
|
588
646
|
}
|
|
589
647
|
/**
|
|
590
|
-
* Toggles the visibility of the popup
|
|
648
|
+
* Toggles the visibility of the popup or actionSheet.
|
|
649
|
+
* If you use the `toggle` method to show or hide the popup or actionSheet,
|
|
591
650
|
* the `open` and `close` events do not fire.
|
|
592
651
|
* ([more information and example]({% slug overview_datetimepicker %}#toc-methods-and-events)).
|
|
593
652
|
*
|
|
@@ -597,17 +656,12 @@ export class DateTimePickerComponent {
|
|
|
597
656
|
if (this.disabled || this.readonly || show === this.isOpen) {
|
|
598
657
|
return;
|
|
599
658
|
}
|
|
600
|
-
|
|
601
|
-
if (
|
|
602
|
-
this.
|
|
659
|
+
this.windowSize = windowSize();
|
|
660
|
+
if (this.isAdaptive) {
|
|
661
|
+
this.toggleActionSheet(show);
|
|
603
662
|
}
|
|
604
663
|
else {
|
|
605
|
-
this.
|
|
606
|
-
// Changes the tab and the calendar or clock icon to the designated default.
|
|
607
|
-
if (this.activeTab !== this.defaultTab) {
|
|
608
|
-
this.activeTab = this.defaultTab;
|
|
609
|
-
this.cdr.detectChanges();
|
|
610
|
-
}
|
|
664
|
+
this._togglePopup(show);
|
|
611
665
|
}
|
|
612
666
|
}
|
|
613
667
|
/**
|
|
@@ -669,7 +723,7 @@ export class DateTimePickerComponent {
|
|
|
669
723
|
const shouldOpen = !this.isOpen;
|
|
670
724
|
// handle focus first to maintain correct event order `focus` => `open`
|
|
671
725
|
this.handleFocus();
|
|
672
|
-
this.
|
|
726
|
+
this.toggleDateTime(shouldOpen);
|
|
673
727
|
this.switchFocus();
|
|
674
728
|
});
|
|
675
729
|
}
|
|
@@ -698,7 +752,7 @@ export class DateTimePickerComponent {
|
|
|
698
752
|
this.run(runInZone, () => {
|
|
699
753
|
this.onBlur.emit();
|
|
700
754
|
this.onControlTouched();
|
|
701
|
-
this.
|
|
755
|
+
this.toggleDateTime(false);
|
|
702
756
|
this.cdr.markForCheck();
|
|
703
757
|
});
|
|
704
758
|
}
|
|
@@ -742,7 +796,7 @@ export class DateTimePickerComponent {
|
|
|
742
796
|
const runInZone = valueChangePresent || hasObservers(this.close);
|
|
743
797
|
this.run(runInZone, () => {
|
|
744
798
|
this.handleValueChange(candidate);
|
|
745
|
-
this.
|
|
799
|
+
this.toggleDateTime(false);
|
|
746
800
|
});
|
|
747
801
|
}
|
|
748
802
|
/**
|
|
@@ -753,7 +807,7 @@ export class DateTimePickerComponent {
|
|
|
753
807
|
return;
|
|
754
808
|
}
|
|
755
809
|
const runInZone = hasObservers(this.close);
|
|
756
|
-
this.run(runInZone, () => this.
|
|
810
|
+
this.run(runInZone, () => this.toggleDateTime(false));
|
|
757
811
|
}
|
|
758
812
|
/**
|
|
759
813
|
* @hidden
|
|
@@ -761,7 +815,16 @@ export class DateTimePickerComponent {
|
|
|
761
815
|
handleInputValueChange(value) {
|
|
762
816
|
this.handleValueChange(value);
|
|
763
817
|
if (this.isOpen) {
|
|
764
|
-
this.
|
|
818
|
+
this.toggleDateTime(false);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* @hidden
|
|
823
|
+
*/
|
|
824
|
+
handleDateInputClick() {
|
|
825
|
+
this.windowSize = windowSize();
|
|
826
|
+
if (this.isAdaptive) {
|
|
827
|
+
this.toggleDateTime(true);
|
|
765
828
|
}
|
|
766
829
|
}
|
|
767
830
|
/**
|
|
@@ -785,7 +848,7 @@ export class DateTimePickerComponent {
|
|
|
785
848
|
this.handleCancel();
|
|
786
849
|
break;
|
|
787
850
|
case !this.isOpen && altKey && Keys.ArrowDown:
|
|
788
|
-
this.ngZone.run(() => this.
|
|
851
|
+
this.ngZone.run(() => this.toggleDateTime(true));
|
|
789
852
|
break;
|
|
790
853
|
case altKey && Keys.ArrowRight:
|
|
791
854
|
this.changeActiveTab('time');
|
|
@@ -821,12 +884,22 @@ export class DateTimePickerComponent {
|
|
|
821
884
|
this.input.focus();
|
|
822
885
|
}
|
|
823
886
|
}
|
|
887
|
+
/**
|
|
888
|
+
* @hidden
|
|
889
|
+
*/
|
|
890
|
+
handleActionSheetCollapse() {
|
|
891
|
+
// If not handled, the actionsheet expanded state does not get updated when overlay is clicked
|
|
892
|
+
this.cdr.markForCheck();
|
|
893
|
+
// Reset tabs after actionsheet is collapsed, otherwise the tab change can be seen during the animation
|
|
894
|
+
this.resetActiveTab();
|
|
895
|
+
}
|
|
824
896
|
/**
|
|
825
897
|
* @hidden
|
|
826
898
|
*/
|
|
827
899
|
popupButtonsClasses(type) {
|
|
828
900
|
const buttonType = type ? type : 'base';
|
|
829
|
-
|
|
901
|
+
const sizeClass = `${this.isAdaptive ? getSizeClass('button', 'large') : this.size ? getSizeClass('button', this.size) : ''}`;
|
|
902
|
+
return `${sizeClass} ${this.rounded ? getRoundedClass(this.rounded) : ''} ${this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : ''}`;
|
|
830
903
|
}
|
|
831
904
|
/**
|
|
832
905
|
* @hidden
|
|
@@ -836,6 +909,55 @@ export class DateTimePickerComponent {
|
|
|
836
909
|
preventMouseDown(event) {
|
|
837
910
|
event.preventDefault();
|
|
838
911
|
}
|
|
912
|
+
_togglePopup(show) {
|
|
913
|
+
const shouldOpen = isPresent(show) ? show : !this.isOpen;
|
|
914
|
+
if (shouldOpen) {
|
|
915
|
+
this.openPopup();
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
this.closePopup();
|
|
919
|
+
this.resetActiveTab();
|
|
920
|
+
}
|
|
921
|
+
toggleActionSheet(show) {
|
|
922
|
+
if (isPresent(show) && show && !this.isOpen) {
|
|
923
|
+
this.actionSheet.toggle();
|
|
924
|
+
this.updateActionSheetAdaptiveAppearance();
|
|
925
|
+
this.setAriaActiveDescendant();
|
|
926
|
+
}
|
|
927
|
+
else if (isPresent(show) && !show && this.isOpen) {
|
|
928
|
+
this.actionSheet.toggle();
|
|
929
|
+
this.ariaActiveDescendantSubscription.unsubscribe();
|
|
930
|
+
this.renderer.removeAttribute(this.input.inputElement, attributeNames.ariaActiveDescendant);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
updateActionSheetAdaptiveAppearance() {
|
|
934
|
+
let element;
|
|
935
|
+
let animationContainer;
|
|
936
|
+
if (this.actionSheet) {
|
|
937
|
+
element = this.actionSheet['element'].nativeElement.querySelector('.k-actionsheet');
|
|
938
|
+
animationContainer = this.actionSheet['element'].nativeElement.querySelector('.k-child-animation-container');
|
|
939
|
+
if (this.windowSize === 'medium') {
|
|
940
|
+
this.renderer.removeClass(element, 'k-actionsheet-fullscreen');
|
|
941
|
+
this.renderer.removeStyle(animationContainer, 'height');
|
|
942
|
+
}
|
|
943
|
+
else if (this.windowSize === 'small') {
|
|
944
|
+
this.renderer.addClass(element, 'k-actionsheet-fullscreen');
|
|
945
|
+
this.renderer.setStyle(animationContainer, 'height', '100%');
|
|
946
|
+
}
|
|
947
|
+
this.renderer.addClass(element, 'k-adaptive-actionsheet');
|
|
948
|
+
this.renderer.addClass(element, 'k-actionsheet-bottom');
|
|
949
|
+
this.renderer.setStyle(animationContainer, 'bottom', '0px');
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* Changes the tab and the calendar or clock icon to the designated default.
|
|
954
|
+
*/
|
|
955
|
+
resetActiveTab() {
|
|
956
|
+
if (this.activeTab !== this.defaultTab) {
|
|
957
|
+
this.activeTab = this.defaultTab;
|
|
958
|
+
this.cdr.detectChanges();
|
|
959
|
+
}
|
|
960
|
+
}
|
|
839
961
|
verifyValue(value) {
|
|
840
962
|
if (!isDevMode()) {
|
|
841
963
|
return;
|
|
@@ -892,7 +1014,10 @@ export class DateTimePickerComponent {
|
|
|
892
1014
|
}
|
|
893
1015
|
return timeFormatRegExp.test(part.type);
|
|
894
1016
|
}
|
|
895
|
-
|
|
1017
|
+
/**
|
|
1018
|
+
* @hidden
|
|
1019
|
+
*/
|
|
1020
|
+
toggleDateTime(open) {
|
|
896
1021
|
if (open === this.isOpen) {
|
|
897
1022
|
return;
|
|
898
1023
|
}
|
|
@@ -939,24 +1064,20 @@ export class DateTimePickerComponent {
|
|
|
939
1064
|
});
|
|
940
1065
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
941
1066
|
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
942
|
-
|
|
943
|
-
if (this.calendar.type === 'infinite') {
|
|
944
|
-
this.subscriptions.add(this.calendar.monthView.focusedCellChange.subscribe((id) => {
|
|
945
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaActiveDescendant, id);
|
|
946
|
-
}));
|
|
947
|
-
}
|
|
948
|
-
else {
|
|
949
|
-
this.subscriptions.add(this.calendar.multiViewCalendar.viewList.focusedCellChange.subscribe((id) => {
|
|
950
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaActiveDescendant, id);
|
|
951
|
-
}));
|
|
952
|
-
}
|
|
953
|
-
}
|
|
1067
|
+
this.setAriaActiveDescendant();
|
|
954
1068
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.handleCancel());
|
|
955
1069
|
}
|
|
1070
|
+
setAriaActiveDescendant() {
|
|
1071
|
+
const focusedCellChangeEvent = this.calendar.type === 'infinite' ?
|
|
1072
|
+
this.calendar.monthView.focusedCellChange :
|
|
1073
|
+
this.calendar.multiViewCalendar.viewList.focusedCellChange;
|
|
1074
|
+
this.ariaActiveDescendantSubscription = focusedCellChangeEvent.subscribe((id) => this.renderer.setAttribute(this.input.inputElement, attributeNames.ariaActiveDescendant, id));
|
|
1075
|
+
}
|
|
956
1076
|
closePopup() {
|
|
957
1077
|
if (!this.isOpen) {
|
|
958
1078
|
return;
|
|
959
1079
|
}
|
|
1080
|
+
this.ariaActiveDescendantSubscription.unsubscribe();
|
|
960
1081
|
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
961
1082
|
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaActiveDescendant);
|
|
962
1083
|
this.popupRef.close();
|
|
@@ -981,7 +1102,8 @@ export class DateTimePickerComponent {
|
|
|
981
1102
|
const relatedTarget = event.relatedTarget || document.activeElement;
|
|
982
1103
|
const focusInPopup = isPresent(this.popupRef) && this.popupRef.popupElement.contains(relatedTarget);
|
|
983
1104
|
const focusInWrapper = this.wrapper.nativeElement.contains(relatedTarget);
|
|
984
|
-
|
|
1105
|
+
const isInsideActionSheet = this.actionSheet && (this.actionSheet.element.nativeElement.contains(event.target) || this.actionSheet.element.nativeElement.contains(relatedTarget));
|
|
1106
|
+
return focusInPopup || focusInWrapper || isInsideActionSheet;
|
|
985
1107
|
}
|
|
986
1108
|
setTimeSelectorMinMax(selectedDate) {
|
|
987
1109
|
const minDateSelected = isPresent(selectedDate) && isEqual(getDate(selectedDate), getDate(this.min));
|
|
@@ -997,7 +1119,7 @@ export class DateTimePickerComponent {
|
|
|
997
1119
|
* If the popup is available, runs a popup change detection.
|
|
998
1120
|
*/
|
|
999
1121
|
detectPopupChanges() {
|
|
1000
|
-
if (!this.isOpen) {
|
|
1122
|
+
if (!this.isOpen || this.isAdaptive) {
|
|
1001
1123
|
return;
|
|
1002
1124
|
}
|
|
1003
1125
|
this.popupRef.popup.changeDetectorRef.detectChanges();
|
|
@@ -1034,7 +1156,7 @@ export class DateTimePickerComponent {
|
|
|
1034
1156
|
}
|
|
1035
1157
|
}
|
|
1036
1158
|
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i1.PopupService }, { token: i2.IntlService }, { token: i0.ChangeDetectorRef }, { token: i3.PickerService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: TOUCH_ENABLED }, { token: i4.LocalizationService }, { token: i5.DisabledDatesService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1037
|
-
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: { focusableId: "focusableId", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings", title: "title", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", cancelButton: "cancelButton", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", focusedDate: "focusedDate", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", weekNumber: "weekNumber", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", incompleteDateValidation: "incompleteDateValidation", defaultTab: "defaultTab", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-datetimepicker": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
1159
|
+
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: { focusableId: "focusableId", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings", title: "title", subtitle: "subtitle", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", cancelButton: "cancelButton", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", focusedDate: "focusedDate", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", weekNumber: "weekNumber", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", incompleteDateValidation: "incompleteDateValidation", adaptiveMode: "adaptiveMode", defaultTab: "defaultTab", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur" }, host: { properties: { "class.k-datetimepicker": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
|
|
1038
1160
|
PickerService,
|
|
1039
1161
|
LocalizationService,
|
|
1040
1162
|
DisabledDatesService,
|
|
@@ -1042,7 +1164,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1042
1164
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateTimePickerComponent), multi: true },
|
|
1043
1165
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateTimePickerComponent), multi: true },
|
|
1044
1166
|
{ provide: KendoInput, useExisting: forwardRef(() => DateTimePickerComponent) }
|
|
1045
|
-
], queries: [{ propertyName: "cellTemplate", first: true, predicate: CellTemplateDirective, descendants: true }, { propertyName: "monthCellTemplate", first: true, predicate: MonthCellTemplateDirective, descendants: true }, { propertyName: "yearCellTemplate", first: true, predicate: YearCellTemplateDirective, descendants: true }, { propertyName: "decadeCellTemplate", first: true, predicate: DecadeCellTemplateDirective, descendants: true }, { propertyName: "centuryCellTemplate", first: true, predicate: CenturyCellTemplateDirective, descendants: true }, { propertyName: "weekNumberTemplate", first: true, predicate: WeekNumberCellTemplateDirective, descendants: true }, { propertyName: "headerTitleTemplate", first: true, predicate: HeaderTitleTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "toggleButton", first: true, predicate: ["toggleButton"], descendants: true, static: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, read: TemplateRef, static: true }], exportAs: ["kendo-datetimepicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
1167
|
+
], queries: [{ propertyName: "cellTemplate", first: true, predicate: CellTemplateDirective, descendants: true }, { propertyName: "monthCellTemplate", first: true, predicate: MonthCellTemplateDirective, descendants: true }, { propertyName: "yearCellTemplate", first: true, predicate: YearCellTemplateDirective, descendants: true }, { propertyName: "decadeCellTemplate", first: true, predicate: DecadeCellTemplateDirective, descendants: true }, { propertyName: "centuryCellTemplate", first: true, predicate: CenturyCellTemplateDirective, descendants: true }, { propertyName: "weekNumberTemplate", first: true, predicate: WeekNumberCellTemplateDirective, descendants: true }, { propertyName: "headerTitleTemplate", first: true, predicate: HeaderTitleTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "toggleButton", first: true, predicate: ["toggleButton"], descendants: true, static: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "actionSheet", first: true, predicate: ["actionSheet"], descendants: true }], exportAs: ["kendo-datetimepicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
1046
1168
|
<ng-container
|
|
1047
1169
|
kendoDateTimePickerLocalizedMessages
|
|
1048
1170
|
|
|
@@ -1118,6 +1240,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1118
1240
|
[fillMode]="fillMode"
|
|
1119
1241
|
[rounded]="rounded"
|
|
1120
1242
|
[size]="size"
|
|
1243
|
+
(click)="handleDateInputClick()"
|
|
1121
1244
|
>
|
|
1122
1245
|
</kendo-dateinput>
|
|
1123
1246
|
<button
|
|
@@ -1152,6 +1275,64 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1152
1275
|
<ng-container #container></ng-container>
|
|
1153
1276
|
|
|
1154
1277
|
<ng-template #popupTemplate>
|
|
1278
|
+
<ng-container *ngTemplateOutlet="dateTimeTemplate"></ng-container>
|
|
1279
|
+
</ng-template>
|
|
1280
|
+
|
|
1281
|
+
<kendo-resize-sensor *ngIf="isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
|
|
1282
|
+
|
|
1283
|
+
<kendo-actionsheet
|
|
1284
|
+
#actionSheet
|
|
1285
|
+
(overlayClick)="toggleDateTime(false)"
|
|
1286
|
+
(collapse)="handleActionSheetCollapse()"
|
|
1287
|
+
>
|
|
1288
|
+
<ng-template kendoActionSheetTemplate>
|
|
1289
|
+
<div class="k-actionsheet-titlebar">
|
|
1290
|
+
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
1291
|
+
<div class="k-actionsheet-title">
|
|
1292
|
+
<div class="k-text-center">{{ title }}</div>
|
|
1293
|
+
<div class="k-actionsheet-subtitle k-text-center">{{ subtitle }}</div>
|
|
1294
|
+
</div>
|
|
1295
|
+
<div class="k-actionsheet-actions">
|
|
1296
|
+
<button
|
|
1297
|
+
kendoButton
|
|
1298
|
+
icon="x"
|
|
1299
|
+
[attr.title]="localization.get('clearTitle')"
|
|
1300
|
+
[svgIcon]="xIcon"
|
|
1301
|
+
fillMode="flat"
|
|
1302
|
+
size="large"
|
|
1303
|
+
innerCssClass="k-button-icon"
|
|
1304
|
+
(click)="toggleDateTime(false)">
|
|
1305
|
+
</button>
|
|
1306
|
+
</div>
|
|
1307
|
+
</div>
|
|
1308
|
+
</div>
|
|
1309
|
+
<div class="k-actionsheet-content !k-overflow-hidden">
|
|
1310
|
+
<ng-container *ngTemplateOutlet="dateTimeTemplate"></ng-container>
|
|
1311
|
+
</div>
|
|
1312
|
+
<div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
|
|
1313
|
+
<button kendoButton
|
|
1314
|
+
(click)="handleCancel()"
|
|
1315
|
+
size="large"
|
|
1316
|
+
[attr.title]="localization.get('cancelLabel')"
|
|
1317
|
+
[attr.aria-label]="localization.get('cancelLabel')"
|
|
1318
|
+
>
|
|
1319
|
+
{{localization.get('cancel')}}
|
|
1320
|
+
</button>
|
|
1321
|
+
|
|
1322
|
+
<button kendoButton
|
|
1323
|
+
(click)="handleAccept()"
|
|
1324
|
+
size="large"
|
|
1325
|
+
themeColor="primary"
|
|
1326
|
+
[attr.title]="localization.get('acceptLabel')"
|
|
1327
|
+
[attr.aria-label]="localization.get('acceptLabel')"
|
|
1328
|
+
>
|
|
1329
|
+
{{localization.get('accept')}}
|
|
1330
|
+
</button>
|
|
1331
|
+
</div>
|
|
1332
|
+
</ng-template>
|
|
1333
|
+
</kendo-actionsheet>
|
|
1334
|
+
|
|
1335
|
+
<ng-template #dateTimeTemplate>
|
|
1155
1336
|
<div
|
|
1156
1337
|
class="k-datetime-wrap k-{{activeTab}}-tab"
|
|
1157
1338
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1210,6 +1391,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1210
1391
|
>
|
|
1211
1392
|
<div class="k-datetime-calendar-wrap">
|
|
1212
1393
|
<kendo-calendar
|
|
1394
|
+
[ngClass]="{'k-calendar-lg': isAdaptive}"
|
|
1213
1395
|
[focusedDate]="focusedDate"
|
|
1214
1396
|
[(value)]="calendarValue"
|
|
1215
1397
|
[type]="calendarType"
|
|
@@ -1239,6 +1421,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1239
1421
|
</div>
|
|
1240
1422
|
<div class="k-datetime-time-wrap">
|
|
1241
1423
|
<kendo-timeselector
|
|
1424
|
+
[ngClass]="{'k-timeselector-lg': isAdaptive}"
|
|
1242
1425
|
[value]="value"
|
|
1243
1426
|
[format]="timeSelectorFormat"
|
|
1244
1427
|
[min]="timeSelectorMin"
|
|
@@ -1247,6 +1430,8 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1247
1430
|
[cancelButton]="false"
|
|
1248
1431
|
[steps]="steps"
|
|
1249
1432
|
[disabled]="disableTimeSelector"
|
|
1433
|
+
[isAdaptiveEnabled]="isAdaptiveModeEnabled"
|
|
1434
|
+
[isDateTimePicker]="true"
|
|
1250
1435
|
>
|
|
1251
1436
|
<kendo-timeselector-messages
|
|
1252
1437
|
[now]="localization.get('now')"
|
|
@@ -1257,6 +1442,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1257
1442
|
</div>
|
|
1258
1443
|
</div>
|
|
1259
1444
|
<div
|
|
1445
|
+
*ngIf="!isAdaptive"
|
|
1260
1446
|
class="k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch"
|
|
1261
1447
|
[kendoEventsOutsideAngular]="{
|
|
1262
1448
|
keydown: handleTabOut,
|
|
@@ -1296,7 +1482,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
|
|
|
1296
1482
|
</div>
|
|
1297
1483
|
</div>
|
|
1298
1484
|
</ng-template>
|
|
1299
|
-
`, isInline: true, components: [{ type: i6.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type:
|
|
1485
|
+
`, isInline: true, components: [{ type: i6.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i11.CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: i12.CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: i13.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: i14.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i15.LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i16.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i16.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { type: i16.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1300
1486
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
1301
1487
|
type: Component,
|
|
1302
1488
|
args: [{
|
|
@@ -1388,6 +1574,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1388
1574
|
[fillMode]="fillMode"
|
|
1389
1575
|
[rounded]="rounded"
|
|
1390
1576
|
[size]="size"
|
|
1577
|
+
(click)="handleDateInputClick()"
|
|
1391
1578
|
>
|
|
1392
1579
|
</kendo-dateinput>
|
|
1393
1580
|
<button
|
|
@@ -1422,6 +1609,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1422
1609
|
<ng-container #container></ng-container>
|
|
1423
1610
|
|
|
1424
1611
|
<ng-template #popupTemplate>
|
|
1612
|
+
<ng-container *ngTemplateOutlet="dateTimeTemplate"></ng-container>
|
|
1613
|
+
</ng-template>
|
|
1614
|
+
|
|
1615
|
+
<kendo-resize-sensor *ngIf="isAdaptiveModeEnabled" (resize)="onResize()"></kendo-resize-sensor>
|
|
1616
|
+
|
|
1617
|
+
<kendo-actionsheet
|
|
1618
|
+
#actionSheet
|
|
1619
|
+
(overlayClick)="toggleDateTime(false)"
|
|
1620
|
+
(collapse)="handleActionSheetCollapse()"
|
|
1621
|
+
>
|
|
1622
|
+
<ng-template kendoActionSheetTemplate>
|
|
1623
|
+
<div class="k-actionsheet-titlebar">
|
|
1624
|
+
<div class="k-actionsheet-titlebar-group k-hbox">
|
|
1625
|
+
<div class="k-actionsheet-title">
|
|
1626
|
+
<div class="k-text-center">{{ title }}</div>
|
|
1627
|
+
<div class="k-actionsheet-subtitle k-text-center">{{ subtitle }}</div>
|
|
1628
|
+
</div>
|
|
1629
|
+
<div class="k-actionsheet-actions">
|
|
1630
|
+
<button
|
|
1631
|
+
kendoButton
|
|
1632
|
+
icon="x"
|
|
1633
|
+
[attr.title]="localization.get('clearTitle')"
|
|
1634
|
+
[svgIcon]="xIcon"
|
|
1635
|
+
fillMode="flat"
|
|
1636
|
+
size="large"
|
|
1637
|
+
innerCssClass="k-button-icon"
|
|
1638
|
+
(click)="toggleDateTime(false)">
|
|
1639
|
+
</button>
|
|
1640
|
+
</div>
|
|
1641
|
+
</div>
|
|
1642
|
+
</div>
|
|
1643
|
+
<div class="k-actionsheet-content !k-overflow-hidden">
|
|
1644
|
+
<ng-container *ngTemplateOutlet="dateTimeTemplate"></ng-container>
|
|
1645
|
+
</div>
|
|
1646
|
+
<div class="k-actions k-actions-stretched k-actions-horizontal k-actionsheet-footer">
|
|
1647
|
+
<button kendoButton
|
|
1648
|
+
(click)="handleCancel()"
|
|
1649
|
+
size="large"
|
|
1650
|
+
[attr.title]="localization.get('cancelLabel')"
|
|
1651
|
+
[attr.aria-label]="localization.get('cancelLabel')"
|
|
1652
|
+
>
|
|
1653
|
+
{{localization.get('cancel')}}
|
|
1654
|
+
</button>
|
|
1655
|
+
|
|
1656
|
+
<button kendoButton
|
|
1657
|
+
(click)="handleAccept()"
|
|
1658
|
+
size="large"
|
|
1659
|
+
themeColor="primary"
|
|
1660
|
+
[attr.title]="localization.get('acceptLabel')"
|
|
1661
|
+
[attr.aria-label]="localization.get('acceptLabel')"
|
|
1662
|
+
>
|
|
1663
|
+
{{localization.get('accept')}}
|
|
1664
|
+
</button>
|
|
1665
|
+
</div>
|
|
1666
|
+
</ng-template>
|
|
1667
|
+
</kendo-actionsheet>
|
|
1668
|
+
|
|
1669
|
+
<ng-template #dateTimeTemplate>
|
|
1425
1670
|
<div
|
|
1426
1671
|
class="k-datetime-wrap k-{{activeTab}}-tab"
|
|
1427
1672
|
[kendoEventsOutsideAngular]="{
|
|
@@ -1480,6 +1725,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1480
1725
|
>
|
|
1481
1726
|
<div class="k-datetime-calendar-wrap">
|
|
1482
1727
|
<kendo-calendar
|
|
1728
|
+
[ngClass]="{'k-calendar-lg': isAdaptive}"
|
|
1483
1729
|
[focusedDate]="focusedDate"
|
|
1484
1730
|
[(value)]="calendarValue"
|
|
1485
1731
|
[type]="calendarType"
|
|
@@ -1509,6 +1755,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1509
1755
|
</div>
|
|
1510
1756
|
<div class="k-datetime-time-wrap">
|
|
1511
1757
|
<kendo-timeselector
|
|
1758
|
+
[ngClass]="{'k-timeselector-lg': isAdaptive}"
|
|
1512
1759
|
[value]="value"
|
|
1513
1760
|
[format]="timeSelectorFormat"
|
|
1514
1761
|
[min]="timeSelectorMin"
|
|
@@ -1517,6 +1764,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1517
1764
|
[cancelButton]="false"
|
|
1518
1765
|
[steps]="steps"
|
|
1519
1766
|
[disabled]="disableTimeSelector"
|
|
1767
|
+
[isAdaptiveEnabled]="isAdaptiveModeEnabled"
|
|
1768
|
+
[isDateTimePicker]="true"
|
|
1520
1769
|
>
|
|
1521
1770
|
<kendo-timeselector-messages
|
|
1522
1771
|
[now]="localization.get('now')"
|
|
@@ -1527,6 +1776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1527
1776
|
</div>
|
|
1528
1777
|
</div>
|
|
1529
1778
|
<div
|
|
1779
|
+
*ngIf="!isAdaptive"
|
|
1530
1780
|
class="k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch"
|
|
1531
1781
|
[kendoEventsOutsideAngular]="{
|
|
1532
1782
|
keydown: handleTabOut,
|
|
@@ -1599,6 +1849,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1599
1849
|
type: Input
|
|
1600
1850
|
}], title: [{
|
|
1601
1851
|
type: Input
|
|
1852
|
+
}], subtitle: [{
|
|
1853
|
+
type: Input
|
|
1602
1854
|
}], disabled: [{
|
|
1603
1855
|
type: Input
|
|
1604
1856
|
}], readonly: [{
|
|
@@ -1631,6 +1883,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1631
1883
|
type: Input
|
|
1632
1884
|
}], incompleteDateValidation: [{
|
|
1633
1885
|
type: Input
|
|
1886
|
+
}], adaptiveMode: [{
|
|
1887
|
+
type: Input
|
|
1634
1888
|
}], valueChange: [{
|
|
1635
1889
|
type: Output
|
|
1636
1890
|
}], open: [{
|
|
@@ -1678,4 +1932,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1678
1932
|
}], popupTemplate: [{
|
|
1679
1933
|
type: ViewChild,
|
|
1680
1934
|
args: ['popupTemplate', { read: TemplateRef, static: true }]
|
|
1935
|
+
}], actionSheet: [{
|
|
1936
|
+
type: ViewChild,
|
|
1937
|
+
args: ['actionSheet']
|
|
1681
1938
|
}] } });
|