@syncfusion/ej2-calendars 25.2.5 → 26.1.35
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/.eslintrc.json +3 -2
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +150 -201
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +145 -197
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +11 -11
- package/src/calendar/calendar.d.ts +1 -2
- package/src/calendar/calendar.js +35 -27
- package/src/calendar/islamic.js +8 -7
- package/src/datepicker/datepicker.d.ts +0 -1
- package/src/datepicker/datepicker.js +15 -16
- package/src/daterangepicker/daterangepicker.d.ts +0 -1
- package/src/daterangepicker/daterangepicker.js +25 -26
- package/src/datetimepicker/datetimepicker.js +17 -11
- package/src/maskbase/interface.js +0 -1
- package/src/maskbase/masked-date-time.js +3 -5
- package/src/timepicker/timepicker.d.ts +0 -1
- package/src/timepicker/timepicker.js +7 -11
- package/styles/bootstrap-dark.css +143 -91
- package/styles/bootstrap-dark.scss +20 -5
- package/styles/bootstrap.css +143 -93
- package/styles/bootstrap.scss +20 -5
- package/styles/bootstrap4.css +143 -93
- package/styles/bootstrap4.scss +20 -5
- package/styles/bootstrap5-dark.css +143 -94
- package/styles/bootstrap5-dark.scss +20 -5
- package/styles/bootstrap5.css +143 -94
- package/styles/bootstrap5.scss +20 -5
- package/styles/calendar/_bds-definition.scss +4 -3
- package/styles/calendar/_bootstrap5.3-definition.scss +256 -0
- package/styles/calendar/_fluent2-definition.scss +290 -0
- package/styles/calendar/_layout.scss +34 -14
- package/styles/calendar/_material3-definition.scss +0 -9
- package/styles/calendar/_theme.scss +104 -45
- package/styles/calendar/bootstrap-dark.css +48 -24
- package/styles/calendar/bootstrap.css +48 -24
- package/styles/calendar/bootstrap4.css +48 -24
- package/styles/calendar/bootstrap5-dark.css +48 -24
- package/styles/calendar/bootstrap5.css +48 -24
- package/styles/calendar/fabric-dark.css +51 -25
- package/styles/calendar/fabric.css +51 -25
- package/styles/calendar/fluent-dark.css +67 -33
- package/styles/calendar/fluent.css +67 -33
- package/styles/calendar/fluent2.css +2022 -0
- package/styles/calendar/fluent2.scss +5 -0
- package/styles/calendar/highcontrast-light.css +49 -24
- package/styles/calendar/highcontrast.css +51 -25
- package/styles/calendar/icons/_bootstrap5.3.scss +13 -0
- package/styles/calendar/icons/_fluent2.scss +13 -0
- package/styles/calendar/material-dark.css +51 -25
- package/styles/calendar/material.css +51 -25
- package/styles/calendar/material3-dark.css +52 -23
- package/styles/calendar/material3.css +52 -23
- package/styles/calendar/tailwind-dark.css +49 -25
- package/styles/calendar/tailwind.css +49 -25
- package/styles/datepicker/_bootstrap5.3-definition.scss +107 -0
- package/styles/datepicker/_fluent2-definition.scss +118 -0
- package/styles/datepicker/_layout.scss +20 -11
- package/styles/datepicker/_material3-definition.scss +0 -19
- package/styles/datepicker/bootstrap-dark.css +16 -18
- package/styles/datepicker/bootstrap.css +16 -18
- package/styles/datepicker/bootstrap4.css +16 -18
- package/styles/datepicker/bootstrap5-dark.css +18 -19
- package/styles/datepicker/bootstrap5.css +18 -19
- package/styles/datepicker/fabric-dark.css +16 -18
- package/styles/datepicker/fabric.css +16 -18
- package/styles/datepicker/fluent-dark.css +18 -19
- package/styles/datepicker/fluent.css +18 -19
- package/styles/datepicker/fluent2.css +1680 -0
- package/styles/datepicker/fluent2.scss +7 -0
- package/styles/datepicker/highcontrast-light.css +16 -18
- package/styles/datepicker/highcontrast.css +16 -18
- package/styles/datepicker/icons/_bootstrap5.3.scss +76 -0
- package/styles/datepicker/icons/_fluent2.scss +83 -0
- package/styles/datepicker/material-dark.css +27 -20
- package/styles/datepicker/material.css +41 -22
- package/styles/datepicker/material3-dark.css +46 -24
- package/styles/datepicker/material3.css +46 -24
- package/styles/datepicker/tailwind-dark.css +18 -19
- package/styles/datepicker/tailwind.css +18 -19
- package/styles/daterangepicker/_bds-definition.scss +2 -2
- package/styles/daterangepicker/_bootstrap5.3-definition.scss +296 -0
- package/styles/daterangepicker/_fluent2-definition.scss +309 -0
- package/styles/daterangepicker/_layout.scss +14 -22
- package/styles/daterangepicker/_material3-definition.scss +0 -20
- package/styles/daterangepicker/_theme.scss +16 -8
- package/styles/daterangepicker/bootstrap-dark.css +54 -33
- package/styles/daterangepicker/bootstrap.css +54 -33
- package/styles/daterangepicker/bootstrap4.css +54 -33
- package/styles/daterangepicker/bootstrap5-dark.css +56 -34
- package/styles/daterangepicker/bootstrap5.css +56 -34
- package/styles/daterangepicker/fabric-dark.css +54 -33
- package/styles/daterangepicker/fabric.css +54 -33
- package/styles/daterangepicker/fluent-dark.css +66 -39
- package/styles/daterangepicker/fluent.css +66 -39
- package/styles/daterangepicker/fluent2.css +2465 -0
- package/styles/daterangepicker/fluent2.scss +7 -0
- package/styles/daterangepicker/highcontrast-light.css +54 -33
- package/styles/daterangepicker/highcontrast.css +54 -33
- package/styles/daterangepicker/icons/_bootstrap5.3.scss +92 -0
- package/styles/daterangepicker/icons/_fluent2.scss +132 -0
- package/styles/daterangepicker/material-dark.css +63 -34
- package/styles/daterangepicker/material.css +77 -36
- package/styles/daterangepicker/material3-dark.css +88 -38
- package/styles/daterangepicker/material3.css +88 -38
- package/styles/daterangepicker/tailwind-dark.css +58 -35
- package/styles/daterangepicker/tailwind.css +58 -35
- package/styles/datetimepicker/_bootstrap5.3-definition.scss +65 -0
- package/styles/datetimepicker/_fluent2-definition.scss +65 -0
- package/styles/datetimepicker/_layout.scss +0 -3
- package/styles/datetimepicker/_material3-definition.scss +0 -10
- package/styles/datetimepicker/_theme.scss +2 -2
- package/styles/datetimepicker/bootstrap-dark.css +7 -3
- package/styles/datetimepicker/bootstrap.css +7 -3
- package/styles/datetimepicker/bootstrap4.css +7 -3
- package/styles/datetimepicker/bootstrap5-dark.css +7 -3
- package/styles/datetimepicker/bootstrap5.css +7 -3
- package/styles/datetimepicker/fabric-dark.css +7 -3
- package/styles/datetimepicker/fabric.css +7 -3
- package/styles/datetimepicker/fluent-dark.css +7 -3
- package/styles/datetimepicker/fluent.css +7 -3
- package/styles/datetimepicker/fluent2.css +1408 -0
- package/styles/datetimepicker/fluent2.scss +8 -0
- package/styles/datetimepicker/highcontrast-light.css +7 -3
- package/styles/datetimepicker/highcontrast.css +7 -3
- package/styles/datetimepicker/icons/_bootstrap5.3.scss +11 -0
- package/styles/datetimepicker/icons/_fluent2.scss +11 -0
- package/styles/datetimepicker/material-dark.css +16 -4
- package/styles/datetimepicker/material.css +30 -6
- package/styles/datetimepicker/material3-dark.css +33 -7
- package/styles/datetimepicker/material3.css +33 -7
- package/styles/datetimepicker/tailwind-dark.css +7 -3
- package/styles/datetimepicker/tailwind.css +7 -3
- package/styles/fabric-dark.css +146 -92
- package/styles/fabric-dark.scss +20 -5
- package/styles/fabric.css +146 -94
- package/styles/fabric.scss +20 -5
- package/styles/fluent-dark.css +172 -108
- package/styles/fluent-dark.scss +20 -5
- package/styles/fluent.css +172 -108
- package/styles/fluent.scss +20 -5
- package/styles/fluent2.css +4429 -0
- package/styles/fluent2.scss +20 -0
- package/styles/highcontrast-light.css +144 -91
- package/styles/highcontrast-light.scss +20 -5
- package/styles/highcontrast.css +146 -94
- package/styles/highcontrast.scss +20 -5
- package/styles/material-dark.css +157 -112
- package/styles/material-dark.scss +20 -5
- package/styles/material.css +171 -140
- package/styles/material.scss +20 -5
- package/styles/material3-dark.css +189 -139
- package/styles/material3-dark.scss +20 -5
- package/styles/material3.css +189 -139
- package/styles/material3.scss +20 -5
- package/styles/tailwind-dark.css +146 -96
- package/styles/tailwind-dark.scss +20 -5
- package/styles/tailwind.css +146 -96
- package/styles/tailwind.scss +20 -5
- package/styles/timepicker/_bootstrap5.3-definition.scss +85 -0
- package/styles/timepicker/_fluent2-definition.scss +84 -0
- package/styles/timepicker/_layout.scss +2 -16
- package/styles/timepicker/_material3-definition.scss +0 -16
- package/styles/timepicker/_theme.scss +1 -4
- package/styles/timepicker/bootstrap-dark.css +18 -10
- package/styles/timepicker/bootstrap.css +18 -10
- package/styles/timepicker/bootstrap4.css +18 -10
- package/styles/timepicker/bootstrap5-dark.css +18 -10
- package/styles/timepicker/bootstrap5.css +18 -10
- package/styles/timepicker/fabric-dark.css +18 -10
- package/styles/timepicker/fabric.css +18 -10
- package/styles/timepicker/fluent-dark.css +18 -10
- package/styles/timepicker/fluent.css +18 -10
- package/styles/timepicker/fluent2.css +1531 -0
- package/styles/timepicker/fluent2.scss +6 -0
- package/styles/timepicker/highcontrast-light.css +18 -10
- package/styles/timepicker/highcontrast.css +18 -10
- package/styles/timepicker/icons/_bootstrap5.3.scss +24 -0
- package/styles/timepicker/icons/_fluent2.scss +24 -0
- package/styles/timepicker/material-dark.css +27 -11
- package/styles/timepicker/material.css +41 -13
- package/styles/timepicker/material3-dark.css +45 -14
- package/styles/timepicker/material3.css +45 -14
- package/styles/timepicker/tailwind-dark.css +18 -10
- package/styles/timepicker/tailwind.css +18 -10
- package/CHANGELOG.md +0 -1218
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, Internationalization, isNullOrUndefined, Browser, attributes, closest, addClass, removeClass, rippleEffect, EventHandler, getValue, getDefaultDateObject, cldrData, detach, L10n, extend, KeyboardEvents, getUniqueID, Property, Event, NotifyPropertyChanges, throwError, HijriParser, Touch, formatUnit, Animation, setValue, ChildProperty, merge, isUndefined, createElement, select, remove, prepend, Collection, append, setStyleAttribute } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Popup } from '@syncfusion/ej2-popups';
|
|
3
3
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
4
4
|
import { Button } from '@syncfusion/ej2-buttons';
|
|
@@ -10,7 +10,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
10
10
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
11
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
12
|
};
|
|
13
|
-
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
14
13
|
//class constant defination.
|
|
15
14
|
const OTHERMONTH = 'e-other-month';
|
|
16
15
|
const OTHERDECADE = 'e-other-year';
|
|
@@ -71,7 +70,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
71
70
|
this.isDateSelected = true;
|
|
72
71
|
this.isTodayClicked = false;
|
|
73
72
|
this.preventChange = false;
|
|
74
|
-
this.isAngular = false;
|
|
75
73
|
this.previousDates = false;
|
|
76
74
|
}
|
|
77
75
|
/**
|
|
@@ -269,7 +267,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
269
267
|
if (this.showTodayButton) {
|
|
270
268
|
this.createContentFooter();
|
|
271
269
|
}
|
|
272
|
-
if (this.getModuleName()
|
|
270
|
+
if (this.getModuleName() !== 'daterangepicker') {
|
|
273
271
|
EventHandler.add(this.table, 'focus', this.addContentFocus, this);
|
|
274
272
|
EventHandler.add(this.table, 'blur', this.removeContentFocus, this);
|
|
275
273
|
}
|
|
@@ -340,8 +338,9 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
340
338
|
addClass([this.calendarElement], '' + WEEKNUMBER);
|
|
341
339
|
}
|
|
342
340
|
}
|
|
343
|
-
|
|
344
|
-
|
|
341
|
+
const shortNames = this.getCultureValues().length > 0 &&
|
|
342
|
+
this.getCultureValues() ? this.shiftArray(((this.getCultureValues().length > 0 &&
|
|
343
|
+
this.getCultureValues())), this.firstDayOfWeek) : null;
|
|
345
344
|
if (!isNullOrUndefined(shortNames)) {
|
|
346
345
|
for (let days = 0; days <= daysCount; days++) {
|
|
347
346
|
html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
|
|
@@ -462,6 +461,9 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
462
461
|
this.nextIcon = this.previousIcon = this.table = null;
|
|
463
462
|
}
|
|
464
463
|
keyActionHandle(e, value, multiSelection) {
|
|
464
|
+
if (this.calendarElement === null && e.action === 'escape') {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
465
467
|
const focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
|
|
466
468
|
let selectedDate;
|
|
467
469
|
if (multiSelection) {
|
|
@@ -481,19 +483,22 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
481
483
|
this.effect = '';
|
|
482
484
|
switch (e.action) {
|
|
483
485
|
case 'moveLeft':
|
|
484
|
-
if (this.getModuleName()
|
|
486
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
487
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
485
488
|
this.keyboardNavigate(-1, view, e, this.max, this.min);
|
|
486
489
|
e.preventDefault();
|
|
487
490
|
}
|
|
488
491
|
break;
|
|
489
492
|
case 'moveRight':
|
|
490
|
-
if (this.getModuleName()
|
|
493
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
494
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
491
495
|
this.keyboardNavigate(1, view, e, this.max, this.min);
|
|
492
496
|
e.preventDefault();
|
|
493
497
|
}
|
|
494
498
|
break;
|
|
495
499
|
case 'moveUp':
|
|
496
|
-
if (this.getModuleName()
|
|
500
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
501
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
497
502
|
if (view === 0) {
|
|
498
503
|
this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.
|
|
499
504
|
}
|
|
@@ -504,7 +509,8 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
504
509
|
}
|
|
505
510
|
break;
|
|
506
511
|
case 'moveDown':
|
|
507
|
-
if (this.getModuleName()
|
|
512
|
+
if (this.getModuleName() !== 'daterangepicker' && !isNullOrUndefined(e.target) &&
|
|
513
|
+
e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {
|
|
508
514
|
if (view === 0) {
|
|
509
515
|
this.keyboardNavigate(7, view, e, this.max, this.min);
|
|
510
516
|
}
|
|
@@ -518,13 +524,13 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
518
524
|
if (e.target === this.headerTitleElement) {
|
|
519
525
|
this.navigateTitle(e);
|
|
520
526
|
}
|
|
521
|
-
else if (e.target === this.previousIcon) {
|
|
527
|
+
else if (e.target === this.previousIcon && !e.target.className.includes(DISABLED)) {
|
|
522
528
|
this.navigatePrevious(e);
|
|
523
529
|
}
|
|
524
|
-
else if (e.target === this.nextIcon) {
|
|
530
|
+
else if (e.target === this.nextIcon && !e.target.className.includes(DISABLED)) {
|
|
525
531
|
this.navigateNext(e);
|
|
526
532
|
}
|
|
527
|
-
else if (e.target === this.todayElement) {
|
|
533
|
+
else if (e.target === this.todayElement && !e.target.className.includes(DISABLED)) {
|
|
528
534
|
this.todayButtonClick(e, value);
|
|
529
535
|
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
530
536
|
this.element.focus();
|
|
@@ -537,12 +543,14 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
537
543
|
// eslint-disable-next-line radix
|
|
538
544
|
const d = new Date(parseInt('' + (element).id, 0));
|
|
539
545
|
this.selectDate(e, d, (element));
|
|
546
|
+
if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {
|
|
547
|
+
this.element.focus();
|
|
548
|
+
}
|
|
540
549
|
}
|
|
541
550
|
else {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
this.element.focus();
|
|
551
|
+
if (!e.target.className.includes(DISABLED)) {
|
|
552
|
+
this.contentClick(null, --view, (element), value);
|
|
553
|
+
}
|
|
546
554
|
}
|
|
547
555
|
}
|
|
548
556
|
}
|
|
@@ -616,7 +624,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
616
624
|
case 'tab':
|
|
617
625
|
if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.todayElement) {
|
|
618
626
|
e.preventDefault();
|
|
619
|
-
this.
|
|
627
|
+
if (this.isAngular) {
|
|
628
|
+
this.inputElement.focus();
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
this.element.focus();
|
|
632
|
+
}
|
|
620
633
|
this.hide();
|
|
621
634
|
}
|
|
622
635
|
break;
|
|
@@ -627,6 +640,11 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
627
640
|
this.hide();
|
|
628
641
|
}
|
|
629
642
|
break;
|
|
643
|
+
case 'escape':
|
|
644
|
+
if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && (e.target === this.headerTitleElement || e.target === this.previousIcon || e.target === this.nextIcon || e.target === this.todayElement)) {
|
|
645
|
+
this.hide();
|
|
646
|
+
}
|
|
647
|
+
break;
|
|
630
648
|
}
|
|
631
649
|
}
|
|
632
650
|
keyboardNavigate(number, currentView, e, max, min) {
|
|
@@ -815,7 +833,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
815
833
|
// if (args.isDisabled && +this.value === +args.date) {
|
|
816
834
|
// this.setProperties({ value: null }, true);
|
|
817
835
|
// }
|
|
818
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
819
836
|
let currentTarget;
|
|
820
837
|
if (!isNullOrUndefined(e) && e.type === 'click') {
|
|
821
838
|
currentTarget = e.currentTarget;
|
|
@@ -906,7 +923,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
906
923
|
const tdEle = this.dayCell(localDate);
|
|
907
924
|
const dayLink = this.createElement('span');
|
|
908
925
|
const localMonth = (value && (value).getMonth() === localDate.getMonth());
|
|
909
|
-
const select
|
|
926
|
+
const select = (value && (value).getFullYear() === yr && localMonth);
|
|
910
927
|
const title = this.globalize.formatDate(localDate, { type: 'date', format: 'MMM y' });
|
|
911
928
|
dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, {
|
|
912
929
|
format: null, type: 'dateTime', skeleton: 'MMM'
|
|
@@ -914,7 +931,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
914
931
|
if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
|
|
915
932
|
addClass([tdEle], DISABLED);
|
|
916
933
|
}
|
|
917
|
-
else if (!valueUtil && select
|
|
934
|
+
else if (!valueUtil && select) {
|
|
918
935
|
addClass([tdEle], SELECTED);
|
|
919
936
|
}
|
|
920
937
|
else {
|
|
@@ -1562,9 +1579,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1562
1579
|
navigateTitle(e) {
|
|
1563
1580
|
e.preventDefault();
|
|
1564
1581
|
this.title(e);
|
|
1565
|
-
if (this.getModuleName() === 'calendar') {
|
|
1566
|
-
this.table.focus();
|
|
1567
|
-
}
|
|
1568
1582
|
}
|
|
1569
1583
|
previous() {
|
|
1570
1584
|
this.effect = '';
|
|
@@ -1593,9 +1607,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1593
1607
|
this.islamicModule.islamicPrevious();
|
|
1594
1608
|
}
|
|
1595
1609
|
this.triggerNavigate(e);
|
|
1596
|
-
if (this.getModuleName() === 'calendar') {
|
|
1597
|
-
this.table.focus();
|
|
1598
|
-
}
|
|
1599
1610
|
}
|
|
1600
1611
|
next() {
|
|
1601
1612
|
this.effect = '';
|
|
@@ -1624,9 +1635,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1624
1635
|
this.islamicModule.islamicNext();
|
|
1625
1636
|
}
|
|
1626
1637
|
this.triggerNavigate(eve);
|
|
1627
|
-
if (this.getModuleName() === 'calendar') {
|
|
1628
|
-
this.table.focus();
|
|
1629
|
-
}
|
|
1630
1638
|
}
|
|
1631
1639
|
/**
|
|
1632
1640
|
* This method is used to navigate to the month/year/decade view of the Calendar.
|
|
@@ -2636,7 +2644,6 @@ let Calendar = class Calendar extends CalendarBase {
|
|
|
2636
2644
|
if (!isNullOrUndefined(this.value)) {
|
|
2637
2645
|
this.setProperties({ value: this.value }, true);
|
|
2638
2646
|
}
|
|
2639
|
-
// eslint-disable-next-line use-isnan
|
|
2640
2647
|
if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&
|
|
2641
2648
|
!isNullOrUndefined(this.previousDate) || this.previousDate === null
|
|
2642
2649
|
&& !isNaN(+this.value))) {
|
|
@@ -2667,7 +2674,6 @@ Calendar = __decorate([
|
|
|
2667
2674
|
/**
|
|
2668
2675
|
*
|
|
2669
2676
|
*/
|
|
2670
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2671
2677
|
//class constant defination.
|
|
2672
2678
|
const OTHERMONTH$1 = 'e-other-month';
|
|
2673
2679
|
const YEAR$1 = 'e-year';
|
|
@@ -2920,12 +2926,12 @@ class Islamic {
|
|
|
2920
2926
|
const dayLink = this.calendarInstance.createElement('span');
|
|
2921
2927
|
const localMonth = (value &&
|
|
2922
2928
|
(this.getIslamicDate(value)).month === (this.getIslamicDate(localDate)).month);
|
|
2923
|
-
const select
|
|
2929
|
+
const select = (value && (this.getIslamicDate(value)).year === yr && localMonth);
|
|
2924
2930
|
dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'dateTime', format: 'MMM', calendar: 'islamic' });
|
|
2925
2931
|
if ((this.calendarInstance.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.calendarInstance.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {
|
|
2926
2932
|
addClass([tdEle], DISABLED$1);
|
|
2927
2933
|
}
|
|
2928
|
-
else if (!valueUtil && select
|
|
2934
|
+
else if (!valueUtil && select) {
|
|
2929
2935
|
addClass([tdEle], SELECTED$1);
|
|
2930
2936
|
}
|
|
2931
2937
|
else {
|
|
@@ -2963,7 +2969,8 @@ class Islamic {
|
|
|
2963
2969
|
endHdrYr = Number(endHdrYr.replace(/[٠١٢٣٤٥٦٧٨٩]/g, (d) => String.fromCharCode(d.charCodeAt(0) - 1632 + 48)));
|
|
2964
2970
|
}
|
|
2965
2971
|
const splityear = this.calendarInstance.headerElement.textContent.split('-');
|
|
2966
|
-
if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') ||
|
|
2972
|
+
if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') ||
|
|
2973
|
+
(!isNullOrUndefined(e) && e.type === 'keydown' && e.action === 'end')) {
|
|
2967
2974
|
startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
|
|
2968
2975
|
endHdrYr = this.calendarInstance.headerElement.textContent.split('-')[1].trim();
|
|
2969
2976
|
}
|
|
@@ -2973,8 +2980,8 @@ class Islamic {
|
|
|
2973
2980
|
this.calendarInstance.islamicPreviousHeader = null;
|
|
2974
2981
|
}
|
|
2975
2982
|
if (this.calendarInstance.previousIconClicked) {
|
|
2976
|
-
|
|
2977
|
-
for (
|
|
2983
|
+
let i = 0;
|
|
2984
|
+
for (i = 0; i <= splityear.length; i++) {
|
|
2978
2985
|
endHdrYr = endHdrYr - splityear[i] === 2 || splityear[i]
|
|
2979
2986
|
- endHdrYr === 2 ? (parseInt(endHdrYr, 10) + 1).toString() :
|
|
2980
2987
|
endHdrYr - splityear[i] === 3 || splityear[i] - endHdrYr === 3 ?
|
|
@@ -3218,18 +3225,12 @@ class Islamic {
|
|
|
3218
3225
|
}
|
|
3219
3226
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
3220
3227
|
|
|
3221
|
-
/**
|
|
3222
|
-
* Calendar modules
|
|
3223
|
-
*/
|
|
3224
|
-
|
|
3225
3228
|
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
3226
3229
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3227
3230
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3228
3231
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3229
3232
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3230
3233
|
};
|
|
3231
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
3232
|
-
/// <reference path='../calendar/calendar-model.d.ts'/>
|
|
3233
3234
|
//class constant defination
|
|
3234
3235
|
const DATEWRAPPER = 'e-date-wrapper';
|
|
3235
3236
|
const ROOT$1 = 'e-datepicker';
|
|
@@ -3281,7 +3282,6 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3281
3282
|
this.invalidValueString = null;
|
|
3282
3283
|
this.checkPreviousValue = null;
|
|
3283
3284
|
this.maskedDateValue = '';
|
|
3284
|
-
this.isAngular = false;
|
|
3285
3285
|
this.preventChange = false;
|
|
3286
3286
|
this.isIconClicked = false;
|
|
3287
3287
|
this.isDynamicValueChanged = false;
|
|
@@ -3386,7 +3386,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3386
3386
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
3387
3387
|
}
|
|
3388
3388
|
if (this.fullScreenMode && Browser.isDevice) {
|
|
3389
|
-
this.cssClass += ' ' +
|
|
3389
|
+
this.cssClass += ' ' + 'e-popup-expand';
|
|
3390
3390
|
}
|
|
3391
3391
|
let updatedCssClassValues = this.cssClass;
|
|
3392
3392
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
@@ -3655,8 +3655,6 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3655
3655
|
});
|
|
3656
3656
|
}
|
|
3657
3657
|
break;
|
|
3658
|
-
default:
|
|
3659
|
-
break;
|
|
3660
3658
|
}
|
|
3661
3659
|
}
|
|
3662
3660
|
unBindEvents() {
|
|
@@ -4076,8 +4074,8 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4076
4074
|
}
|
|
4077
4075
|
strictModeUpdate() {
|
|
4078
4076
|
let format;
|
|
4079
|
-
|
|
4080
|
-
|
|
4077
|
+
const pattern = /^y/;
|
|
4078
|
+
const charPattern = /[^a-zA-Z]/;
|
|
4081
4079
|
let formatOptions;
|
|
4082
4080
|
if (this.getModuleName() === 'datetimepicker') {
|
|
4083
4081
|
format = !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat;
|
|
@@ -4201,10 +4199,10 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4201
4199
|
open: () => {
|
|
4202
4200
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
4203
4201
|
this.iconRight = parseInt(window.getComputedStyle(this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;
|
|
4204
|
-
this.touchModule = new Touch(this.calendarElement.querySelector(
|
|
4202
|
+
this.touchModule = new Touch(this.calendarElement.querySelector('.e-content.e-month'), {
|
|
4205
4203
|
swipe: this.CalendarSwipeHandler.bind(this)
|
|
4206
4204
|
});
|
|
4207
|
-
EventHandler.add(this.calendarElement.querySelector(
|
|
4205
|
+
EventHandler.add(this.calendarElement.querySelector('.e-content.e-month'), 'touchstart', this.TouchStartHandler, this);
|
|
4208
4206
|
}
|
|
4209
4207
|
if (this.getModuleName() !== 'datetimepicker') {
|
|
4210
4208
|
if (document.activeElement !== this.inputElement) {
|
|
@@ -4251,26 +4249,22 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4251
4249
|
let direction = 0;
|
|
4252
4250
|
if (this.iconRight) {
|
|
4253
4251
|
switch (e.swipeDirection) {
|
|
4254
|
-
case
|
|
4252
|
+
case 'Left':
|
|
4255
4253
|
direction = 1;
|
|
4256
4254
|
break;
|
|
4257
|
-
case
|
|
4255
|
+
case 'Right':
|
|
4258
4256
|
direction = -1;
|
|
4259
4257
|
break;
|
|
4260
|
-
default:
|
|
4261
|
-
break;
|
|
4262
4258
|
}
|
|
4263
4259
|
}
|
|
4264
4260
|
else {
|
|
4265
4261
|
switch (e.swipeDirection) {
|
|
4266
|
-
case
|
|
4262
|
+
case 'Up':
|
|
4267
4263
|
direction = 1;
|
|
4268
4264
|
break;
|
|
4269
|
-
case
|
|
4265
|
+
case 'Down':
|
|
4270
4266
|
direction = -1;
|
|
4271
4267
|
break;
|
|
4272
|
-
default:
|
|
4273
|
-
break;
|
|
4274
4268
|
}
|
|
4275
4269
|
}
|
|
4276
4270
|
if (this.touchStart) {
|
|
@@ -4325,16 +4319,17 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4325
4319
|
}
|
|
4326
4320
|
monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);
|
|
4327
4321
|
if (this.fullScreenMode) {
|
|
4328
|
-
const modelCloseIcon = this.createElement(
|
|
4322
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
4329
4323
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelCloseHandler, this);
|
|
4330
|
-
const modelTodayButton = this.calendarElement.querySelector(
|
|
4331
|
-
h2.classList.add(
|
|
4332
|
-
modelTodayButton.classList.add(
|
|
4324
|
+
const modelTodayButton = this.calendarElement.querySelector('button.e-today');
|
|
4325
|
+
h2.classList.add('e-day-wrapper');
|
|
4326
|
+
modelTodayButton.classList.add('e-outline');
|
|
4333
4327
|
modelHeader.appendChild(modelCloseIcon);
|
|
4334
4328
|
modelHeader.appendChild(modelTodayButton);
|
|
4335
4329
|
}
|
|
4336
|
-
if (!this.fullScreenMode)
|
|
4330
|
+
if (!this.fullScreenMode) {
|
|
4337
4331
|
modelHeader.appendChild(yearHeading);
|
|
4332
|
+
}
|
|
4338
4333
|
h2.appendChild(daySpan);
|
|
4339
4334
|
h2.appendChild(monthSpan);
|
|
4340
4335
|
modelHeader.appendChild(h2);
|
|
@@ -4541,7 +4536,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4541
4536
|
EventHandler.add(document, 'mousedown touchstart', this.documentHandler, this);
|
|
4542
4537
|
});
|
|
4543
4538
|
if (Browser.isDevice) {
|
|
4544
|
-
|
|
4539
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
4545
4540
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
4546
4541
|
this.mobilePopupWrapper.appendChild(dlgOverlay);
|
|
4547
4542
|
}
|
|
@@ -4599,7 +4594,8 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4599
4594
|
this.modal = null;
|
|
4600
4595
|
}
|
|
4601
4596
|
if (Browser.isDevice) {
|
|
4602
|
-
if (!isNullOrUndefined(this.mobilePopupWrapper) &&
|
|
4597
|
+
if (!isNullOrUndefined(this.mobilePopupWrapper) &&
|
|
4598
|
+
(prevent && (isNullOrUndefined(this.preventArgs) || !this.preventArgs.cancel))) {
|
|
4603
4599
|
this.mobilePopupWrapper.remove();
|
|
4604
4600
|
this.mobilePopupWrapper = null;
|
|
4605
4601
|
}
|
|
@@ -4868,7 +4864,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4868
4864
|
this.globalize = new Internationalization(this.locale);
|
|
4869
4865
|
this.checkFormat();
|
|
4870
4866
|
this.checkView();
|
|
4871
|
-
const attributes
|
|
4867
|
+
const attributes = dynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
4872
4868
|
['value', 'min', 'max', 'disabled', 'readonly', 'style', 'name', 'placeholder', 'type'];
|
|
4873
4869
|
let options;
|
|
4874
4870
|
if (this.getModuleName() === 'datetimepicker') {
|
|
@@ -4893,7 +4889,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4893
4889
|
options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };
|
|
4894
4890
|
}
|
|
4895
4891
|
}
|
|
4896
|
-
for (const prop of attributes
|
|
4892
|
+
for (const prop of attributes) {
|
|
4897
4893
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
4898
4894
|
switch (prop) {
|
|
4899
4895
|
case 'disabled':
|
|
@@ -5040,9 +5036,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
5040
5036
|
this.calendarElement.querySelectorAll(dateIdString)[0] &&
|
|
5041
5037
|
this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
|
|
5042
5038
|
if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&
|
|
5043
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5044
5039
|
!isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
|
|
5045
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5046
5040
|
&& new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
|
|
5047
5041
|
|| (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
|
|
5048
5042
|
addClass([this.inputWrapper.container], ERROR);
|
|
@@ -5295,18 +5289,12 @@ DatePicker = __decorate$1([
|
|
|
5295
5289
|
NotifyPropertyChanges
|
|
5296
5290
|
], DatePicker);
|
|
5297
5291
|
|
|
5298
|
-
/**
|
|
5299
|
-
* Datepicker modules
|
|
5300
|
-
*/
|
|
5301
|
-
|
|
5302
5292
|
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
5303
5293
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5304
5294
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5305
5295
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5306
5296
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
5307
5297
|
};
|
|
5308
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
5309
|
-
/// <reference path='../calendar/calendar-model.d.ts'/>
|
|
5310
5298
|
const DATERANGEWRAPPER = 'e-date-range-wrapper';
|
|
5311
5299
|
const INPUTCONTAINER$1 = 'e-input-group';
|
|
5312
5300
|
const DATERANGEICON = 'e-input-group-icon e-range-icon e-icons';
|
|
@@ -5417,7 +5405,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5417
5405
|
this.preventBlur = false;
|
|
5418
5406
|
this.preventFocus = false;
|
|
5419
5407
|
this.invalidValueString = null;
|
|
5420
|
-
this.isAngular = false;
|
|
5421
5408
|
this.preventChange = false;
|
|
5422
5409
|
this.dateRangeOptions = options;
|
|
5423
5410
|
}
|
|
@@ -5641,20 +5628,20 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5641
5628
|
this.bindEvents();
|
|
5642
5629
|
}
|
|
5643
5630
|
setDataAttribute(isDynamic) {
|
|
5644
|
-
let attributes
|
|
5631
|
+
let attributes = {};
|
|
5645
5632
|
if (!isDynamic) {
|
|
5646
5633
|
for (let i = 0; i < this.element.attributes.length; i++) {
|
|
5647
|
-
attributes
|
|
5634
|
+
attributes[this.element.attributes[i].name] =
|
|
5648
5635
|
this.element.getAttribute(this.element.attributes[i].name);
|
|
5649
5636
|
}
|
|
5650
5637
|
}
|
|
5651
5638
|
else {
|
|
5652
|
-
attributes
|
|
5639
|
+
attributes = this.htmlAttributes;
|
|
5653
5640
|
}
|
|
5654
|
-
for (const pro of Object.keys(attributes
|
|
5641
|
+
for (const pro of Object.keys(attributes)) {
|
|
5655
5642
|
if (pro.indexOf('data') === 0) {
|
|
5656
|
-
this.firstHiddenChild.setAttribute(pro, attributes
|
|
5657
|
-
this.secondHiddenChild.setAttribute(pro, attributes
|
|
5643
|
+
this.firstHiddenChild.setAttribute(pro, attributes[`${pro}`]);
|
|
5644
|
+
this.secondHiddenChild.setAttribute(pro, attributes[`${pro}`]);
|
|
5658
5645
|
}
|
|
5659
5646
|
}
|
|
5660
5647
|
}
|
|
@@ -5686,14 +5673,14 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5686
5673
|
const name = element.getAttribute('name') ? element.getAttribute('name') : element.getAttribute('id');
|
|
5687
5674
|
input.setAttribute('name', name);
|
|
5688
5675
|
element.removeAttribute('name');
|
|
5689
|
-
const attributes
|
|
5690
|
-
for (let i = 0; i < attributes
|
|
5691
|
-
if (isNullOrUndefined(element.getAttribute(attributes
|
|
5676
|
+
const attributes = ['required', 'aria-required', 'form'];
|
|
5677
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
5678
|
+
if (isNullOrUndefined(element.getAttribute(attributes[i]))) {
|
|
5692
5679
|
continue;
|
|
5693
5680
|
}
|
|
5694
|
-
const attr = element.getAttribute(attributes
|
|
5695
|
-
input.setAttribute(attributes
|
|
5696
|
-
element.removeAttribute(attributes
|
|
5681
|
+
const attr = element.getAttribute(attributes[i]);
|
|
5682
|
+
input.setAttribute(attributes[i], attr);
|
|
5683
|
+
element.removeAttribute(attributes[i]);
|
|
5697
5684
|
}
|
|
5698
5685
|
}
|
|
5699
5686
|
updateHtmlAttributeToWrapper() {
|
|
@@ -5953,11 +5940,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5953
5940
|
}
|
|
5954
5941
|
checkHtmlAttributes(isDynamic) {
|
|
5955
5942
|
this.globalize = new Internationalization(this.locale);
|
|
5956
|
-
const attributes
|
|
5943
|
+
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
5957
5944
|
['startDate', 'endDate', 'minDays', 'maxDays', 'min', 'max', 'disabled', 'readonly', 'style', 'name', 'placeholder',
|
|
5958
5945
|
'type', 'value'];
|
|
5959
5946
|
const format = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
5960
|
-
for (const prop of attributes
|
|
5947
|
+
for (const prop of attributes) {
|
|
5961
5948
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
5962
5949
|
switch (prop) {
|
|
5963
5950
|
case 'disabled':
|
|
@@ -6048,8 +6035,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6048
6035
|
const startDate = this.presetsItem[i].start;
|
|
6049
6036
|
const endDate = this.presetsItem[i].end;
|
|
6050
6037
|
if (this.startValue && this.endValue) {
|
|
6051
|
-
if (startDate.getDate()
|
|
6052
|
-
|
|
6038
|
+
if (startDate.getDate() === this.startValue.getDate() && startDate.getMonth() === this.startValue.getMonth() &&
|
|
6039
|
+
startDate.getFullYear() === this.startValue.getFullYear() && endDate.getDate() === this.endValue.getDate() &&
|
|
6040
|
+
endDate.getMonth() === this.endValue.getMonth() && endDate.getFullYear() === this.endValue.getFullYear()) {
|
|
6053
6041
|
this.activeIndex = i;
|
|
6054
6042
|
this.isCustomRange = false;
|
|
6055
6043
|
}
|
|
@@ -6321,7 +6309,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6321
6309
|
}
|
|
6322
6310
|
this.updateHiddenInput();
|
|
6323
6311
|
}
|
|
6324
|
-
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
6325
6312
|
getStartEndDate(date, isEnd, range, dateOptions) {
|
|
6326
6313
|
if (this.depth === 'Month') {
|
|
6327
6314
|
return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
|
|
@@ -7937,10 +7924,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
7937
7924
|
const controlContainer = this.createElement('div', { className: RANGECONTAINER });
|
|
7938
7925
|
const headerContainer = this.createElement('div', { className: RANGEHEADER });
|
|
7939
7926
|
if (this.isMobile && this.fullScreenMode) {
|
|
7940
|
-
const modelHeaderIconWrapper = this.createElement(
|
|
7941
|
-
const modelCloseIcon = this.createElement(
|
|
7927
|
+
const modelHeaderIconWrapper = this.createElement('div', { className: 'e-model-header-wrapper' });
|
|
7928
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
7942
7929
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
7943
|
-
const modelApplyButton = this.createElement(
|
|
7930
|
+
const modelApplyButton = this.createElement('span', { className: 'e-apply' });
|
|
7944
7931
|
EventHandler.add(modelApplyButton, 'mousedown touchstart', this.applyFunction, this);
|
|
7945
7932
|
modelHeaderIconWrapper.appendChild(modelCloseIcon);
|
|
7946
7933
|
modelHeaderIconWrapper.appendChild(modelApplyButton);
|
|
@@ -8035,10 +8022,13 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8035
8022
|
eve.preventDefault();
|
|
8036
8023
|
}
|
|
8037
8024
|
if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
|
|
8038
|
-
if (!(this.previousStartValue && this.previousEndValue &&
|
|
8039
|
-
this.startValue.
|
|
8040
|
-
|
|
8041
|
-
|
|
8025
|
+
if (!(this.previousStartValue && this.previousEndValue &&
|
|
8026
|
+
this.startValue.getDate() === this.previousStartValue.getDate() &&
|
|
8027
|
+
this.startValue.getMonth() === this.previousStartValue.getMonth() &&
|
|
8028
|
+
this.startValue.getFullYear() === this.previousStartValue.getFullYear()
|
|
8029
|
+
&& this.endValue.getDate() === this.previousEndValue.getDate() &&
|
|
8030
|
+
this.endValue.getMonth() === this.previousEndValue.getMonth()
|
|
8031
|
+
&& this.endValue.getFullYear() === this.previousEndValue.getFullYear())) {
|
|
8042
8032
|
Input.setValue(this.rangeArgs(eve).text, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
8043
8033
|
}
|
|
8044
8034
|
this.previousStartValue = new Date(+this.startValue);
|
|
@@ -8208,9 +8198,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8208
8198
|
if (this.fullScreenMode) {
|
|
8209
8199
|
const modelWrapper = createElement('div', { className: 'e-range-mob-popup-wrap' });
|
|
8210
8200
|
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
8211
|
-
const modelTitleSpan = this.createElement(
|
|
8212
|
-
modelTitleSpan.textContent =
|
|
8213
|
-
const modelCloseIcon = this.createElement(
|
|
8201
|
+
const modelTitleSpan = this.createElement('span', { className: 'e-model-title' });
|
|
8202
|
+
modelTitleSpan.textContent = 'Select Preset';
|
|
8203
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
8214
8204
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelRangeCloseHandler, this);
|
|
8215
8205
|
const presetContent = this.presetElement;
|
|
8216
8206
|
modelHeader.appendChild(modelCloseIcon);
|
|
@@ -8274,10 +8264,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8274
8264
|
if (this.isMobile && this.fullScreenMode) {
|
|
8275
8265
|
this.iconRangeRight = this.calendarElement && window.getComputedStyle(this.calendarElement.querySelector('.e-header.e-month .e-prev')).cssFloat;
|
|
8276
8266
|
if (this.iconRangeRight) {
|
|
8277
|
-
this.touchRangeModule = new Touch(this.calendarElement.querySelector(
|
|
8267
|
+
this.touchRangeModule = new Touch(this.calendarElement.querySelector('.e-content.e-month'), {
|
|
8278
8268
|
swipe: this.dateRangeSwipeHandler.bind(this)
|
|
8279
8269
|
});
|
|
8280
|
-
EventHandler.add(this.calendarElement.querySelector(
|
|
8270
|
+
EventHandler.add(this.calendarElement.querySelector('.e-content.e-month'), 'touchstart', this.touchStartRangeHandler, this);
|
|
8281
8271
|
}
|
|
8282
8272
|
}
|
|
8283
8273
|
attributes(this.inputElement, { 'aria-expanded': 'true', 'aria-owns': this.element.id, 'aria-controls': this.inputElement.id });
|
|
@@ -8355,7 +8345,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8355
8345
|
EventHandler.remove(document, 'keydown', this.popupCloseHandler);
|
|
8356
8346
|
}
|
|
8357
8347
|
}, targetExitViewport: () => {
|
|
8358
|
-
|
|
8348
|
+
const popupEle = this.popupObj && this.popupObj.element;
|
|
8359
8349
|
if (!Browser.isDevice && popupEle && popupEle.getBoundingClientRect().height < window.innerHeight) {
|
|
8360
8350
|
this.hide();
|
|
8361
8351
|
}
|
|
@@ -8376,28 +8366,24 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8376
8366
|
}
|
|
8377
8367
|
dateRangeSwipeHandler(e) {
|
|
8378
8368
|
let direction = 0;
|
|
8379
|
-
if (this.iconRangeRight
|
|
8369
|
+
if (this.iconRangeRight === 'left') {
|
|
8380
8370
|
switch (e.swipeDirection) {
|
|
8381
|
-
case
|
|
8371
|
+
case 'Left':
|
|
8382
8372
|
direction = 1;
|
|
8383
8373
|
break;
|
|
8384
|
-
case
|
|
8374
|
+
case 'Right':
|
|
8385
8375
|
direction = -1;
|
|
8386
8376
|
break;
|
|
8387
|
-
default:
|
|
8388
|
-
break;
|
|
8389
8377
|
}
|
|
8390
8378
|
}
|
|
8391
8379
|
else {
|
|
8392
8380
|
switch (e.swipeDirection) {
|
|
8393
|
-
case
|
|
8381
|
+
case 'Up':
|
|
8394
8382
|
direction = 1;
|
|
8395
8383
|
break;
|
|
8396
|
-
case
|
|
8384
|
+
case 'Down':
|
|
8397
8385
|
direction = -1;
|
|
8398
8386
|
break;
|
|
8399
|
-
default:
|
|
8400
|
-
break;
|
|
8401
8387
|
}
|
|
8402
8388
|
}
|
|
8403
8389
|
if (this.touchRangeStart) {
|
|
@@ -8665,7 +8651,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8665
8651
|
}
|
|
8666
8652
|
createInput() {
|
|
8667
8653
|
if (this.fullScreenMode && this.isMobile) {
|
|
8668
|
-
this.cssClass += ' ' +
|
|
8654
|
+
this.cssClass += ' ' + 'e-popup-expand';
|
|
8669
8655
|
}
|
|
8670
8656
|
let updatedCssClassValue = this.cssClass;
|
|
8671
8657
|
if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
|
|
@@ -9308,13 +9294,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9308
9294
|
this.endButton.element.removeAttribute('disabled');
|
|
9309
9295
|
this.selectableDates();
|
|
9310
9296
|
}
|
|
9311
|
-
super.setOverlayIndex(this.mobileRangePopupWrap, this.popupObj.element, this.modal,
|
|
9312
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9313
|
-
this.isMobile || Browser.isDevice);
|
|
9297
|
+
super.setOverlayIndex(this.mobileRangePopupWrap, this.popupObj.element, this.modal, this.isMobile || Browser.isDevice);
|
|
9314
9298
|
}
|
|
9315
9299
|
});
|
|
9316
9300
|
if (Browser.isDevice) {
|
|
9317
|
-
|
|
9301
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
9318
9302
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
9319
9303
|
this.mobileRangePopupWrap.appendChild(dlgOverlay);
|
|
9320
9304
|
}
|
|
@@ -9504,7 +9488,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9504
9488
|
this.updateHeader();
|
|
9505
9489
|
}
|
|
9506
9490
|
}
|
|
9507
|
-
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
9508
9491
|
getStartEndValue(date, isEnd) {
|
|
9509
9492
|
if (this.depth === 'Month') {
|
|
9510
9493
|
return this.checkDateValue(new Date(this.checkValue(date)));
|
|
@@ -9879,17 +9862,12 @@ DateRangePicker = __decorate$2([
|
|
|
9879
9862
|
NotifyPropertyChanges
|
|
9880
9863
|
], DateRangePicker);
|
|
9881
9864
|
|
|
9882
|
-
/**
|
|
9883
|
-
* DateRangePicker modules
|
|
9884
|
-
*/
|
|
9885
|
-
|
|
9886
9865
|
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
9887
9866
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9888
9867
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9889
9868
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9890
9869
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9891
9870
|
};
|
|
9892
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9893
9871
|
const WRAPPERCLASS = 'e-time-wrapper';
|
|
9894
9872
|
const POPUP$2 = 'e-popup';
|
|
9895
9873
|
const ERROR$2 = 'e-error';
|
|
@@ -9919,13 +9897,7 @@ var TimePickerBase;
|
|
|
9919
9897
|
(function (TimePickerBase) {
|
|
9920
9898
|
// eslint-disable-next-line max-len, jsdoc/require-jsdoc
|
|
9921
9899
|
function createListItems(createdEl, min, max, globalize, timeFormat, step) {
|
|
9922
|
-
if (this.calendarMode === 'Gregorian')
|
|
9923
|
-
|
|
9924
|
-
}
|
|
9925
|
-
else {
|
|
9926
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9927
|
-
|
|
9928
|
-
}
|
|
9900
|
+
if (this.calendarMode === 'Gregorian') ;
|
|
9929
9901
|
let start;
|
|
9930
9902
|
const interval = step * 60000;
|
|
9931
9903
|
const listItems = [];
|
|
@@ -9990,7 +9962,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9990
9962
|
this.timeCollections = [];
|
|
9991
9963
|
this.disableItemCollection = [];
|
|
9992
9964
|
this.invalidValueString = null;
|
|
9993
|
-
this.isAngular = false;
|
|
9994
9965
|
this.preventChange = false;
|
|
9995
9966
|
this.maskedDateValue = '';
|
|
9996
9967
|
this.moduleName = this.getModuleName();
|
|
@@ -10122,14 +10093,14 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10122
10093
|
const name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
|
|
10123
10094
|
input.setAttribute('name', name);
|
|
10124
10095
|
target.removeAttribute('name');
|
|
10125
|
-
const attributes
|
|
10126
|
-
for (let i = 0; i < attributes
|
|
10127
|
-
if (isNullOrUndefined(target.getAttribute(attributes
|
|
10096
|
+
const attributes = ['required', 'aria-required', 'form'];
|
|
10097
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
10098
|
+
if (isNullOrUndefined(target.getAttribute(attributes[i]))) {
|
|
10128
10099
|
continue;
|
|
10129
10100
|
}
|
|
10130
|
-
const attr = target.getAttribute(attributes
|
|
10131
|
-
input.setAttribute(attributes
|
|
10132
|
-
target.removeAttribute(attributes
|
|
10101
|
+
const attr = target.getAttribute(attributes[i]);
|
|
10102
|
+
input.setAttribute(attributes[i], attr);
|
|
10103
|
+
target.removeAttribute(attributes[i]);
|
|
10133
10104
|
}
|
|
10134
10105
|
}
|
|
10135
10106
|
initialize() {
|
|
@@ -10198,7 +10169,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10198
10169
|
}
|
|
10199
10170
|
createInputElement() {
|
|
10200
10171
|
if (this.fullScreenMode && Browser.isDevice) {
|
|
10201
|
-
this.cssClass += ' ' +
|
|
10172
|
+
this.cssClass += ' ' + 'e-popup-expand';
|
|
10202
10173
|
}
|
|
10203
10174
|
let updatedCssClassesValue = this.cssClass;
|
|
10204
10175
|
const isBindClearAction = this.enableMask ? false : true;
|
|
@@ -10309,7 +10280,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10309
10280
|
}
|
|
10310
10281
|
return modules;
|
|
10311
10282
|
}
|
|
10312
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10313
10283
|
cldrFormat(type) {
|
|
10314
10284
|
let cldrDateTimeString;
|
|
10315
10285
|
if (this.locale === 'en' || this.locale === 'en-US') {
|
|
@@ -10457,17 +10427,17 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10457
10427
|
this.popupObj.collision = { X: 'none', Y: 'flip' };
|
|
10458
10428
|
}
|
|
10459
10429
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
10460
|
-
this.popupObj.element.style.maxHeight =
|
|
10461
|
-
this.popupObj.element.style.width =
|
|
10430
|
+
this.popupObj.element.style.maxHeight = '100%';
|
|
10431
|
+
this.popupObj.element.style.width = '100%';
|
|
10462
10432
|
}
|
|
10463
10433
|
else {
|
|
10464
10434
|
this.popupObj.element.style.maxHeight = POPUPDIMENSION;
|
|
10465
10435
|
}
|
|
10466
10436
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
10467
10437
|
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
10468
|
-
const modelTitleSpan = this.createElement(
|
|
10469
|
-
modelTitleSpan.textContent =
|
|
10470
|
-
const modelCloseIcon = this.createElement(
|
|
10438
|
+
const modelTitleSpan = this.createElement('span', { className: 'e-model-title' });
|
|
10439
|
+
modelTitleSpan.textContent = 'Select time';
|
|
10440
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
10471
10441
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.timePopupCloseHandler, this);
|
|
10472
10442
|
modelHeader.appendChild(modelCloseIcon);
|
|
10473
10443
|
modelHeader.appendChild(modelTitleSpan);
|
|
@@ -10852,7 +10822,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10852
10822
|
}
|
|
10853
10823
|
inputHandler(event) {
|
|
10854
10824
|
if (!this.readonly && this.enabled) {
|
|
10855
|
-
if (!((event.action
|
|
10825
|
+
if (!((event.action === 'right' || event.action === 'left' || event.action === 'tab') || ((event.action === 'home' || event.action === 'end' || event.action === 'up' || event.action === 'down') && !this.isPopupOpen() && !this.enableMask))) {
|
|
10856
10826
|
event.preventDefault();
|
|
10857
10827
|
}
|
|
10858
10828
|
switch (event.action) {
|
|
@@ -11186,8 +11156,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11186
11156
|
});
|
|
11187
11157
|
}
|
|
11188
11158
|
break;
|
|
11189
|
-
default:
|
|
11190
|
-
break;
|
|
11191
11159
|
}
|
|
11192
11160
|
}
|
|
11193
11161
|
formResetHandler() {
|
|
@@ -11303,10 +11271,10 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11303
11271
|
}
|
|
11304
11272
|
}
|
|
11305
11273
|
checkAttributes(isDynamic) {
|
|
11306
|
-
const attributes
|
|
11274
|
+
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
11307
11275
|
['step', 'disabled', 'readonly', 'style', 'name', 'value', 'min', 'max', 'placeholder'];
|
|
11308
11276
|
let value;
|
|
11309
|
-
for (const prop of attributes
|
|
11277
|
+
for (const prop of attributes) {
|
|
11310
11278
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
11311
11279
|
switch (prop) {
|
|
11312
11280
|
case 'disabled':
|
|
@@ -12079,7 +12047,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12079
12047
|
}
|
|
12080
12048
|
});
|
|
12081
12049
|
if (Browser.isDevice) {
|
|
12082
|
-
|
|
12050
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
12083
12051
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
12084
12052
|
this.mobileTimePopupWrap.appendChild(dlgOverlay);
|
|
12085
12053
|
}
|
|
@@ -12449,21 +12417,14 @@ __decorate$3([
|
|
|
12449
12417
|
TimePicker = __decorate$3([
|
|
12450
12418
|
NotifyPropertyChanges
|
|
12451
12419
|
], TimePicker);
|
|
12452
|
-
|
|
12453
12420
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
12454
12421
|
|
|
12455
|
-
/**
|
|
12456
|
-
* TimePicker modules
|
|
12457
|
-
*/
|
|
12458
|
-
|
|
12459
12422
|
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
12460
12423
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12461
12424
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
12462
12425
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
12463
12426
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12464
12427
|
};
|
|
12465
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
12466
|
-
///<reference path='../datepicker/datepicker-model.d.ts'/>
|
|
12467
12428
|
//class constant defination
|
|
12468
12429
|
const DATEWRAPPER$1 = 'e-date-wrapper';
|
|
12469
12430
|
const DATEPICKERROOT = 'e-datepicker';
|
|
@@ -12479,7 +12440,7 @@ const ROOT$4 = 'e-datetimepicker';
|
|
|
12479
12440
|
const DATETIMEPOPUPWRAPPER = 'e-datetimepopup-wrapper';
|
|
12480
12441
|
const INPUTWRAPPER$1 = 'e-input-group-icon';
|
|
12481
12442
|
const POPUP$3 = 'e-popup';
|
|
12482
|
-
const TIMEICON
|
|
12443
|
+
const TIMEICON = 'e-time-icon';
|
|
12483
12444
|
const INPUTFOCUS$2 = 'e-input-focus';
|
|
12484
12445
|
const POPUPDIMENSION$1 = '250px';
|
|
12485
12446
|
const ICONANIMATION$1 = 'e-icon-anim';
|
|
@@ -12790,7 +12751,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12790
12751
|
this.renderTimeIcon();
|
|
12791
12752
|
}
|
|
12792
12753
|
renderTimeIcon() {
|
|
12793
|
-
this.timeIcon = Input.appendSpan(INPUTWRAPPER$1 + ' ' + TIMEICON
|
|
12754
|
+
this.timeIcon = Input.appendSpan(INPUTWRAPPER$1 + ' ' + TIMEICON + ' ' + ICONS$1, this.inputWrapper.container);
|
|
12794
12755
|
}
|
|
12795
12756
|
bindInputEvents() {
|
|
12796
12757
|
EventHandler.add(this.timeIcon, 'mousedown', this.timeHandler, this);
|
|
@@ -13011,7 +12972,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13011
12972
|
this.dateTimeWrapper.style.left = '0px';
|
|
13012
12973
|
}
|
|
13013
12974
|
if (Browser.isDevice) {
|
|
13014
|
-
|
|
12975
|
+
const dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });
|
|
13015
12976
|
dlgOverlay.style.zIndex = (this.zIndex - 1).toString();
|
|
13016
12977
|
this.timeModal.appendChild(dlgOverlay);
|
|
13017
12978
|
}
|
|
@@ -13030,7 +12991,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13030
12991
|
if (!this.preventArgs.cancel && !this.readonly) {
|
|
13031
12992
|
const openAnimation = {
|
|
13032
12993
|
name: 'FadeIn',
|
|
13033
|
-
duration: ANIMATIONDURATION$1
|
|
12994
|
+
duration: ANIMATIONDURATION$1
|
|
13034
12995
|
};
|
|
13035
12996
|
if (this.zIndex === 1000) {
|
|
13036
12997
|
this.popupObject.show(new Animation(openAnimation), this.element);
|
|
@@ -13120,9 +13081,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13120
13081
|
}
|
|
13121
13082
|
});
|
|
13122
13083
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
13123
|
-
this.popupObject.element.style.display =
|
|
13124
|
-
this.popupObject.element.style.maxHeight =
|
|
13125
|
-
this.popupObject.element.style.width =
|
|
13084
|
+
this.popupObject.element.style.display = 'flex';
|
|
13085
|
+
this.popupObject.element.style.maxHeight = '100%';
|
|
13086
|
+
this.popupObject.element.style.width = '100%';
|
|
13126
13087
|
}
|
|
13127
13088
|
else {
|
|
13128
13089
|
this.popupObject.element.style.maxHeight = POPUPDIMENSION$1;
|
|
@@ -13130,11 +13091,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13130
13091
|
if (Browser.isDevice && this.fullScreenMode) {
|
|
13131
13092
|
const modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });
|
|
13132
13093
|
const modelHeader = this.createElement('div', { className: 'e-model-header' });
|
|
13133
|
-
const modelTitleSpan = this.createElement(
|
|
13134
|
-
modelTitleSpan.textContent =
|
|
13135
|
-
const modelCloseIcon = this.createElement(
|
|
13094
|
+
const modelTitleSpan = this.createElement('span', { className: 'e-model-title' });
|
|
13095
|
+
modelTitleSpan.textContent = 'Select time';
|
|
13096
|
+
const modelCloseIcon = this.createElement('span', { className: 'e-popup-close' });
|
|
13136
13097
|
EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.dateTimeCloseHandler, this);
|
|
13137
|
-
const timeContent = this.dateTimeWrapper.querySelector(
|
|
13098
|
+
const timeContent = this.dateTimeWrapper.querySelector('.e-content');
|
|
13138
13099
|
modelHeader.appendChild(modelCloseIcon);
|
|
13139
13100
|
modelHeader.appendChild(modelTitleSpan);
|
|
13140
13101
|
modelWrapper.appendChild(modelHeader);
|
|
@@ -13441,9 +13402,15 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13441
13402
|
return this.calculateStartEnd(tempStartValue, start, 'starttime');
|
|
13442
13403
|
}
|
|
13443
13404
|
TimePopupFormat() {
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
const proxy =
|
|
13405
|
+
let format = '';
|
|
13406
|
+
let formatCount = 0;
|
|
13407
|
+
const proxy = this;
|
|
13408
|
+
/**
|
|
13409
|
+
* Formats the value specifier.
|
|
13410
|
+
*
|
|
13411
|
+
* @param {string} formattext - The format text.
|
|
13412
|
+
* @returns {string} The formatted value specifier.
|
|
13413
|
+
*/
|
|
13447
13414
|
function formatValueSpecifier(formattext) {
|
|
13448
13415
|
switch (formattext) {
|
|
13449
13416
|
case 'd':
|
|
@@ -13458,11 +13425,11 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13458
13425
|
case 'yy':
|
|
13459
13426
|
case 'yyy':
|
|
13460
13427
|
case 'yyyy':
|
|
13461
|
-
if (format
|
|
13428
|
+
if (format === '') {
|
|
13462
13429
|
format = format + formattext;
|
|
13463
13430
|
}
|
|
13464
13431
|
else {
|
|
13465
|
-
format = format +
|
|
13432
|
+
format = format + '/' + formattext;
|
|
13466
13433
|
}
|
|
13467
13434
|
formatCount = formatCount + 1;
|
|
13468
13435
|
break;
|
|
@@ -13572,10 +13539,10 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13572
13539
|
}
|
|
13573
13540
|
}
|
|
13574
13541
|
checkAttributes(isDynamic) {
|
|
13575
|
-
const attributes
|
|
13542
|
+
const attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :
|
|
13576
13543
|
['style', 'name', 'step', 'disabled', 'readonly', 'value', 'min', 'max', 'placeholder', 'type'];
|
|
13577
13544
|
let value;
|
|
13578
|
-
for (const prop of attributes
|
|
13545
|
+
for (const prop of attributes) {
|
|
13579
13546
|
if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {
|
|
13580
13547
|
switch (prop) {
|
|
13581
13548
|
case 'name':
|
|
@@ -14141,10 +14108,6 @@ DateTimePicker = __decorate$4([
|
|
|
14141
14108
|
NotifyPropertyChanges
|
|
14142
14109
|
], DateTimePicker);
|
|
14143
14110
|
|
|
14144
|
-
/**
|
|
14145
|
-
* DateTimePicker modules
|
|
14146
|
-
*/
|
|
14147
|
-
|
|
14148
14111
|
const ARROWLEFT = 'ArrowLeft';
|
|
14149
14112
|
const ARROWRIGHT = 'ArrowRight';
|
|
14150
14113
|
const ARROWUP = 'ArrowUp';
|
|
@@ -14432,8 +14395,8 @@ class MaskedDateTime {
|
|
|
14432
14395
|
}
|
|
14433
14396
|
if (month >= 1) {
|
|
14434
14397
|
newDateValue.setMonth(month - 1);
|
|
14435
|
-
if (month >= 10 || month
|
|
14436
|
-
if (this.isLeadingZero && month
|
|
14398
|
+
if (month >= 10 || month === 1) {
|
|
14399
|
+
if (this.isLeadingZero && month === 1) {
|
|
14437
14400
|
this.isNavigate = month.toString().length === 1;
|
|
14438
14401
|
this.isLeadingZero = false;
|
|
14439
14402
|
}
|
|
@@ -14585,7 +14548,6 @@ class MaskedDateTime {
|
|
|
14585
14548
|
case 'a':
|
|
14586
14549
|
{
|
|
14587
14550
|
this.periodCharacter += newVal[start - 1].toLowerCase();
|
|
14588
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14589
14551
|
const periodString = (this.getCulturedValue('dayPeriods.format.wide'));
|
|
14590
14552
|
const periodkeys = Object.keys(periodString);
|
|
14591
14553
|
for (let i = 0; this.periodCharacter.length > 0; i++) {
|
|
@@ -14599,15 +14561,12 @@ class MaskedDateTime {
|
|
|
14599
14561
|
}
|
|
14600
14562
|
break;
|
|
14601
14563
|
}
|
|
14602
|
-
default:
|
|
14603
|
-
break;
|
|
14604
14564
|
}
|
|
14605
14565
|
this.maskDateValue = newDateValue;
|
|
14606
14566
|
}
|
|
14607
14567
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14608
14568
|
formatCheck() {
|
|
14609
|
-
|
|
14610
|
-
const proxy = this;
|
|
14569
|
+
const proxy = this;
|
|
14611
14570
|
function formatValueSpecifier(formattext) {
|
|
14612
14571
|
let result;
|
|
14613
14572
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14934,8 +14893,6 @@ class MaskedDateTime {
|
|
|
14934
14893
|
case 'a':
|
|
14935
14894
|
newDateValue.setHours((newDateValue.getHours() + 12) % 24);
|
|
14936
14895
|
break;
|
|
14937
|
-
default:
|
|
14938
|
-
break;
|
|
14939
14896
|
}
|
|
14940
14897
|
this.maskDateValue = newDateValue.getFullYear() > 0 ? newDateValue : this.maskDateValue;
|
|
14941
14898
|
if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
|
|
@@ -14991,13 +14948,5 @@ class MaskedDateTime {
|
|
|
14991
14948
|
}
|
|
14992
14949
|
}
|
|
14993
14950
|
|
|
14994
|
-
|
|
14995
|
-
* MaskedDateTime modules
|
|
14996
|
-
*/
|
|
14997
|
-
|
|
14998
|
-
/**
|
|
14999
|
-
* Calendar all modules
|
|
15000
|
-
*/
|
|
15001
|
-
|
|
15002
|
-
export { CalendarBase, Calendar, Islamic, DatePicker, Presets, DateRangePicker, TimePickerBase, TimeMaskPlaceholder, TimePicker, DateTimePicker, MaskedDateTime };
|
|
14951
|
+
export { Calendar, CalendarBase, DatePicker, DateRangePicker, DateTimePicker, Islamic, MaskedDateTime, Presets, TimeMaskPlaceholder, TimePicker, TimePickerBase };
|
|
15003
14952
|
//# sourceMappingURL=ej2-calendars.es2015.js.map
|