@syncfusion/ej2-calendars 20.3.56 → 20.4.38
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 +16 -1
- package/CHANGELOG.md +0 -24
- 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 +197 -76
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +196 -75
- 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 +10 -10
- package/src/calendar/calendar.js +40 -19
- package/src/calendar/islamic.js +29 -7
- package/src/datepicker/datepicker.js +28 -15
- package/src/daterangepicker/daterangepicker.d.ts +0 -1
- package/src/daterangepicker/daterangepicker.js +46 -24
- package/src/datetimepicker/datetimepicker.js +13 -2
- package/src/maskbase/masked-date-time.js +24 -0
- package/src/timepicker/timepicker.js +16 -8
- package/styles/bootstrap-dark.css +7 -0
- package/styles/bootstrap.css +7 -0
- package/styles/bootstrap4.css +7 -0
- package/styles/bootstrap5-dark.css +8 -1
- package/styles/bootstrap5.css +7 -0
- package/styles/calendar/_fluent-definition.scss +1 -1
- package/styles/calendar/_material-definition.scss +3 -3
- package/styles/calendar/_theme.scss +1 -1
- package/styles/calendar/bootstrap5-dark.css +1 -1
- package/styles/calendar/fabric-dark.css +1 -1
- package/styles/calendar/fabric.css +1 -1
- package/styles/calendar/fluent-dark.css +3 -3
- package/styles/calendar/fluent.css +2 -2
- package/styles/calendar/material.css +3 -3
- package/styles/daterangepicker/_bootstrap-dark-definition.scss +1 -0
- package/styles/daterangepicker/_bootstrap-definition.scss +1 -0
- package/styles/daterangepicker/_bootstrap4-definition.scss +1 -0
- package/styles/daterangepicker/_bootstrap5-definition.scss +1 -0
- package/styles/daterangepicker/_fabric-dark-definition.scss +1 -0
- package/styles/daterangepicker/_fabric-definition.scss +1 -0
- package/styles/daterangepicker/_fluent-definition.scss +6 -0
- package/styles/daterangepicker/_fusionnew-definition.scss +1 -0
- package/styles/daterangepicker/_highcontrast-definition.scss +1 -0
- package/styles/daterangepicker/_highcontrast-light-definition.scss +1 -0
- package/styles/daterangepicker/_layout.scss +6 -0
- package/styles/daterangepicker/_material-dark-definition.scss +1 -0
- package/styles/daterangepicker/_material-definition.scss +1 -0
- package/styles/daterangepicker/_material3-definition.scss +1 -0
- package/styles/daterangepicker/_tailwind-definition.scss +1 -0
- package/styles/daterangepicker/_theme.scss +33 -0
- package/styles/daterangepicker/bootstrap-dark.css +7 -0
- package/styles/daterangepicker/bootstrap.css +7 -0
- package/styles/daterangepicker/bootstrap4.css +7 -0
- package/styles/daterangepicker/bootstrap5-dark.css +7 -0
- package/styles/daterangepicker/bootstrap5.css +7 -0
- package/styles/daterangepicker/fabric-dark.css +7 -0
- package/styles/daterangepicker/fabric.css +7 -0
- package/styles/daterangepicker/fluent-dark.css +30 -0
- package/styles/daterangepicker/fluent.css +30 -0
- package/styles/daterangepicker/highcontrast-light.css +7 -0
- package/styles/daterangepicker/highcontrast.css +7 -0
- package/styles/daterangepicker/material-dark.css +7 -0
- package/styles/daterangepicker/material.css +5 -0
- package/styles/daterangepicker/tailwind-dark.css +7 -0
- package/styles/daterangepicker/tailwind.css +7 -0
- package/styles/fabric-dark.css +8 -1
- package/styles/fabric.css +8 -1
- package/styles/fluent-dark.css +33 -3
- package/styles/fluent.css +32 -2
- package/styles/highcontrast-light.css +7 -0
- package/styles/highcontrast.css +7 -0
- package/styles/material-dark.css +7 -0
- package/styles/material.css +8 -3
- package/styles/tailwind-dark.css +7 -0
- package/styles/tailwind.css +7 -0
|
@@ -121,6 +121,9 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
121
121
|
'data-role': 'calendar'
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
125
|
+
this.enabled = false;
|
|
126
|
+
}
|
|
124
127
|
this.createHeader();
|
|
125
128
|
this.createContent();
|
|
126
129
|
this.wireEvents();
|
|
@@ -270,8 +273,10 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
270
273
|
else {
|
|
271
274
|
cldrObj = (this.getCultureObjects(cldrData, '' + this.locale));
|
|
272
275
|
}
|
|
273
|
-
|
|
274
|
-
|
|
276
|
+
if (!isNullOrUndefined(cldrObj)) {
|
|
277
|
+
for (const obj of Object.keys(cldrObj)) {
|
|
278
|
+
culShortNames.push(getValue(obj, cldrObj));
|
|
279
|
+
}
|
|
275
280
|
}
|
|
276
281
|
return culShortNames;
|
|
277
282
|
}
|
|
@@ -305,9 +310,11 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
305
310
|
}
|
|
306
311
|
}
|
|
307
312
|
// eslint-disable-next-line max-len
|
|
308
|
-
const shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
|
|
309
|
-
|
|
310
|
-
|
|
313
|
+
const shortNames = this.getCultureValues().length > 0 && this.getCultureValues() ? this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek) : null;
|
|
314
|
+
if (!isNullOrUndefined(shortNames)) {
|
|
315
|
+
for (let days = 0; days <= daysCount; days++) {
|
|
316
|
+
html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
|
|
317
|
+
}
|
|
311
318
|
}
|
|
312
319
|
html = '<tr>' + html + '</tr>';
|
|
313
320
|
this.tableHeadElement.innerHTML = html;
|
|
@@ -489,7 +496,7 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
489
496
|
e.preventDefault();
|
|
490
497
|
break;
|
|
491
498
|
case 'controlDown':
|
|
492
|
-
if (!isNullOrUndefined(focusedDate) || !isNullOrUndefined(selectedDate) && !levelRestrict) {
|
|
499
|
+
if (!isNullOrUndefined(focusedDate) && !levelRestrict || !isNullOrUndefined(selectedDate) && !levelRestrict) {
|
|
493
500
|
this.contentClick(null, --view, (focusedDate || selectedDate), value);
|
|
494
501
|
}
|
|
495
502
|
e.preventDefault();
|
|
@@ -1113,9 +1120,6 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1113
1120
|
case 0:
|
|
1114
1121
|
detach(this.tableBodyElement);
|
|
1115
1122
|
this.renderMonths(e, null, isCustomDate);
|
|
1116
|
-
if (multiSelection && !isNullOrUndefined(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0])) {
|
|
1117
|
-
this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);
|
|
1118
|
-
}
|
|
1119
1123
|
break;
|
|
1120
1124
|
case 1:
|
|
1121
1125
|
detach(this.tableBodyElement);
|
|
@@ -1420,7 +1424,9 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1420
1424
|
}
|
|
1421
1425
|
}
|
|
1422
1426
|
if (this.getModuleName() === 'calendar' && this.element) {
|
|
1423
|
-
|
|
1427
|
+
if (!isNullOrUndefined(this.headerTitleElement)) {
|
|
1428
|
+
EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
|
|
1429
|
+
}
|
|
1424
1430
|
if (this.todayElement) {
|
|
1425
1431
|
EventHandler.remove(this.todayElement, 'click', this.todayButtonClick);
|
|
1426
1432
|
}
|
|
@@ -1438,6 +1444,17 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1438
1444
|
if (this.element) {
|
|
1439
1445
|
this.element.innerHTML = '';
|
|
1440
1446
|
}
|
|
1447
|
+
this.todayElement = null;
|
|
1448
|
+
this.tableBodyElement = null;
|
|
1449
|
+
this.renderDayCellArgs = null;
|
|
1450
|
+
this.headerElement = null;
|
|
1451
|
+
this.nextIcon = null;
|
|
1452
|
+
this.table = null;
|
|
1453
|
+
this.tableHeadElement = null;
|
|
1454
|
+
this.previousIcon = null;
|
|
1455
|
+
this.headerTitleElement = null;
|
|
1456
|
+
this.footer = null;
|
|
1457
|
+
this.contentElement = null;
|
|
1441
1458
|
super.destroy();
|
|
1442
1459
|
}
|
|
1443
1460
|
title(e) {
|
|
@@ -1742,10 +1759,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1742
1759
|
}
|
|
1743
1760
|
previousIconHandler(disabled) {
|
|
1744
1761
|
if (disabled) {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1762
|
+
if (!isNullOrUndefined(this.previousIcon)) {
|
|
1763
|
+
EventHandler.remove(this.previousIcon, 'click', this.navigatePreviousHandler);
|
|
1764
|
+
addClass([this.previousIcon], '' + DISABLED);
|
|
1765
|
+
addClass([this.previousIcon], '' + OVERLAY);
|
|
1766
|
+
this.previousIcon.setAttribute('aria-disabled', 'true');
|
|
1767
|
+
}
|
|
1749
1768
|
}
|
|
1750
1769
|
else {
|
|
1751
1770
|
EventHandler.add(this.previousIcon, 'click', this.navigatePreviousHandler);
|
|
@@ -1768,10 +1787,12 @@ let CalendarBase = class CalendarBase extends Component {
|
|
|
1768
1787
|
}
|
|
1769
1788
|
nextIconHandler(disabled) {
|
|
1770
1789
|
if (disabled) {
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1790
|
+
if (!isNullOrUndefined(this.previousIcon)) {
|
|
1791
|
+
EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);
|
|
1792
|
+
addClass([this.nextIcon], DISABLED);
|
|
1793
|
+
addClass([this.nextIcon], OVERLAY);
|
|
1794
|
+
this.nextIcon.setAttribute('aria-disabled', 'true');
|
|
1795
|
+
}
|
|
1775
1796
|
}
|
|
1776
1797
|
else {
|
|
1777
1798
|
EventHandler.add(this.nextIcon, 'click', this.navigateNextHandler);
|
|
@@ -2728,8 +2749,11 @@ class Islamic {
|
|
|
2728
2749
|
}
|
|
2729
2750
|
break;
|
|
2730
2751
|
case 'Decade': {
|
|
2731
|
-
|
|
2752
|
+
let startIslamicYear = 1361;
|
|
2753
|
+
let gregorianValue = HijriParser.toGregorian(startIslamicYear, 1, 1);
|
|
2754
|
+
let prevDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.min) < 1;
|
|
2732
2755
|
const nextDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.max) > -1;
|
|
2756
|
+
prevDecadeCompare = HijriParser.toGregorian(this.calendarInstance.headerTitleElement.textContent.split('-')[0].trim(), 1, 1).getFullYear() === gregorianValue.getFullYear() ? true : prevDecadeCompare;
|
|
2733
2757
|
this.calendarInstance.previousIconHandler(prevDecadeCompare);
|
|
2734
2758
|
this.calendarInstance.nextIconHandler(nextDecadeCompare);
|
|
2735
2759
|
}
|
|
@@ -2750,7 +2774,9 @@ class Islamic {
|
|
|
2750
2774
|
break;
|
|
2751
2775
|
case 'Decade':
|
|
2752
2776
|
this.calendarInstance.nextIconClicked = true;
|
|
2753
|
-
|
|
2777
|
+
if (islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1) {
|
|
2778
|
+
islamicDate.year = islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1 ? islamicDate.year + 1 : islamicDate.year;
|
|
2779
|
+
}
|
|
2754
2780
|
this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 10, islamicDate.month, 1);
|
|
2755
2781
|
this.calendarInstance.switchView(view);
|
|
2756
2782
|
break;
|
|
@@ -2840,12 +2866,16 @@ class Islamic {
|
|
|
2840
2866
|
let endFullYr = endYr.getFullYear();
|
|
2841
2867
|
let startHdrYr = this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
2842
2868
|
let endHdrYr = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
|
|
2869
|
+
let splityear = this.calendarInstance.headerElement.textContent.split('-');
|
|
2870
|
+
if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') || (!isNullOrUndefined(e) && e.type === 'keydown' && e.action === 'end')) {
|
|
2871
|
+
startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
|
|
2872
|
+
endHdrYr = this.calendarInstance.headerElement.textContent.split('-')[1].trim();
|
|
2873
|
+
}
|
|
2843
2874
|
if (this.calendarInstance.islamicPreviousHeader) {
|
|
2844
2875
|
startHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[0].trim();
|
|
2845
2876
|
endHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[1].trim();
|
|
2846
2877
|
this.calendarInstance.islamicPreviousHeader = null;
|
|
2847
2878
|
}
|
|
2848
|
-
let splityear = this.calendarInstance.headerElement.textContent.split('-');
|
|
2849
2879
|
if (this.calendarInstance.previousIconClicked) {
|
|
2850
2880
|
for (var i = 0; i <= splityear.length; i++) {
|
|
2851
2881
|
endHdrYr = endHdrYr - splityear[i] === 2 || splityear[i] - endHdrYr === 2 ? (parseInt(endHdrYr) + 1).toString() : endHdrYr - splityear[i] === 3 || splityear[i] - endHdrYr === 3 ? (parseInt(endHdrYr) + 2).toString() : endHdrYr - splityear[i] === 4 || splityear[i] - endHdrYr === 4 ? (parseInt(endHdrYr) + 3).toString() : endHdrYr - splityear[i] === 5 || splityear[i] - endHdrYr === 5 ? (parseInt(endHdrYr) + 4).toString() : endHdrYr;
|
|
@@ -2853,11 +2883,21 @@ class Islamic {
|
|
|
2853
2883
|
endHdrYr = (parseInt(endHdrYr) - 1).toString();
|
|
2854
2884
|
}
|
|
2855
2885
|
}
|
|
2886
|
+
if (endHdrYr - splityear[i] === 8 || splityear[i] - endHdrYr === 8) {
|
|
2887
|
+
endHdrYr = (parseInt(endHdrYr) - 9).toString();
|
|
2888
|
+
startHdrYr = (parseInt(endHdrYr) - 9).toString();
|
|
2889
|
+
}
|
|
2890
|
+
if (endHdrYr - splityear[i] === 7 || splityear[i] - endHdrYr === 7) {
|
|
2891
|
+
endHdrYr = (parseInt(endHdrYr) - 8).toString();
|
|
2892
|
+
startHdrYr = (parseInt(endHdrYr) - 9).toString();
|
|
2893
|
+
}
|
|
2856
2894
|
startHdrYr = endHdrYr - startHdrYr === 10
|
|
2857
2895
|
? (parseInt(startHdrYr) + 1).toString() : endHdrYr - startHdrYr === 11
|
|
2858
2896
|
? (parseInt(startHdrYr) + 2).toString() : endHdrYr - startHdrYr === 12
|
|
2859
2897
|
? (parseInt(startHdrYr) + 3).toString() : startHdrYr;
|
|
2860
|
-
|
|
2898
|
+
if (endHdrYr - startHdrYr === 8) {
|
|
2899
|
+
startHdrYr = (parseInt(startHdrYr) - 1).toString();
|
|
2900
|
+
}
|
|
2861
2901
|
}
|
|
2862
2902
|
if (this.calendarInstance.nextIconClicked) {
|
|
2863
2903
|
for (var i = 0; i <= splityear.length; i++) {
|
|
@@ -2871,6 +2911,10 @@ class Islamic {
|
|
|
2871
2911
|
startHdrYr = (parseInt(startHdrYr) + 2).toString();
|
|
2872
2912
|
}
|
|
2873
2913
|
}
|
|
2914
|
+
if (startHdrYr - this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim() > 1) {
|
|
2915
|
+
startHdrYr = (parseInt(this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim()) + 1).toString();
|
|
2916
|
+
endHdrYr = (parseInt(startHdrYr) + 9).toString();
|
|
2917
|
+
}
|
|
2874
2918
|
endHdrYr = endHdrYr - startHdrYr === 10 ? (parseInt(endHdrYr) - 1).toString() : endHdrYr;
|
|
2875
2919
|
endHdrYr = endHdrYr - startHdrYr === 7
|
|
2876
2920
|
? (parseInt(endHdrYr) + 2).toString() : endHdrYr - startHdrYr === 8
|
|
@@ -2906,10 +2950,6 @@ class Islamic {
|
|
|
2906
2950
|
else if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
2907
2951
|
|| year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
2908
2952
|
addClass([tdEle], DISABLED$1);
|
|
2909
|
-
if (year < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
|
|
2910
|
-
|| year > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
|
|
2911
|
-
addClass([tdEle], DISABLED$1);
|
|
2912
|
-
}
|
|
2913
2953
|
}
|
|
2914
2954
|
else if (!isNullOrUndefined(value) &&
|
|
2915
2955
|
(this.getIslamicDate(localDate)).year ===
|
|
@@ -2925,6 +2965,9 @@ class Islamic {
|
|
|
2925
2965
|
EventHandler.add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
|
|
2926
2966
|
}
|
|
2927
2967
|
tdEle.appendChild(dayLink);
|
|
2968
|
+
if ((!isNullOrUndefined(e) && e.action === 'home' && islamicDate.year.toString() === startHdrYr) || (!isNullOrUndefined(e) && e.action === 'end' && islamicDate.year.toString() === endHdrYr)) {
|
|
2969
|
+
addClass([tdEle], FOCUSEDDATE$1);
|
|
2970
|
+
}
|
|
2928
2971
|
tdEles.push(tdEle);
|
|
2929
2972
|
}
|
|
2930
2973
|
}
|
|
@@ -3147,6 +3190,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3147
3190
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
3148
3191
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
3149
3192
|
}
|
|
3193
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
3194
|
+
this.enabled = false;
|
|
3195
|
+
}
|
|
3150
3196
|
this.renderComplete();
|
|
3151
3197
|
this.setTimeZone(this.serverTimezoneOffset);
|
|
3152
3198
|
}
|
|
@@ -3491,7 +3537,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3491
3537
|
}
|
|
3492
3538
|
}
|
|
3493
3539
|
unBindEvents() {
|
|
3494
|
-
|
|
3540
|
+
if (!isNullOrUndefined(this.inputWrapper)) {
|
|
3541
|
+
EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler);
|
|
3542
|
+
}
|
|
3495
3543
|
EventHandler.remove(this.inputElement, 'mouseup', this.mouseUpHandler);
|
|
3496
3544
|
EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
|
|
3497
3545
|
EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
|
|
@@ -3622,10 +3670,10 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3622
3670
|
updateHtmlAttributeToWrapper() {
|
|
3623
3671
|
if (!isNullOrUndefined(this.htmlAttributes)) {
|
|
3624
3672
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
3625
|
-
if (!isNullOrUndefined(this.htmlAttributes[key])) {
|
|
3673
|
+
if (!isNullOrUndefined(this.htmlAttributes[`${key}`])) {
|
|
3626
3674
|
if (containerAttr.indexOf(key) > -1) {
|
|
3627
3675
|
if (key === 'class') {
|
|
3628
|
-
const updatedClassValues = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
|
|
3676
|
+
const updatedClassValues = (this.htmlAttributes[`${key}`].replace(/\s+/g, ' ')).trim();
|
|
3629
3677
|
if (updatedClassValues !== '') {
|
|
3630
3678
|
addClass([this.inputWrapper.container], updatedClassValues.split(' '));
|
|
3631
3679
|
}
|
|
@@ -3634,19 +3682,19 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3634
3682
|
let setStyle = this.inputWrapper.container.getAttribute(key);
|
|
3635
3683
|
if (!isNullOrUndefined(setStyle)) {
|
|
3636
3684
|
if (setStyle.charAt(setStyle.length - 1) === ';') {
|
|
3637
|
-
setStyle = setStyle + this.htmlAttributes[key];
|
|
3685
|
+
setStyle = setStyle + this.htmlAttributes[`${key}`];
|
|
3638
3686
|
}
|
|
3639
3687
|
else {
|
|
3640
|
-
setStyle = setStyle + ';' + this.htmlAttributes[key];
|
|
3688
|
+
setStyle = setStyle + ';' + this.htmlAttributes[`${key}`];
|
|
3641
3689
|
}
|
|
3642
3690
|
}
|
|
3643
3691
|
else {
|
|
3644
|
-
setStyle = this.htmlAttributes[key];
|
|
3692
|
+
setStyle = this.htmlAttributes[`${key}`];
|
|
3645
3693
|
}
|
|
3646
3694
|
this.inputWrapper.container.setAttribute(key, setStyle);
|
|
3647
3695
|
}
|
|
3648
3696
|
else {
|
|
3649
|
-
this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
|
|
3697
|
+
this.inputWrapper.container.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
3650
3698
|
}
|
|
3651
3699
|
}
|
|
3652
3700
|
}
|
|
@@ -3657,7 +3705,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3657
3705
|
if (!isNullOrUndefined(this.htmlAttributes)) {
|
|
3658
3706
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
3659
3707
|
if (containerAttr.indexOf(key) < 0) {
|
|
3660
|
-
this.inputElement.setAttribute(key, this.htmlAttributes[key]);
|
|
3708
|
+
this.inputElement.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
3661
3709
|
}
|
|
3662
3710
|
}
|
|
3663
3711
|
}
|
|
@@ -3769,12 +3817,12 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3769
3817
|
this.isPopupClicked = false;
|
|
3770
3818
|
}
|
|
3771
3819
|
documentHandler(e) {
|
|
3772
|
-
if ((!isNullOrUndefined(this.popupObj) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||
|
|
3820
|
+
if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||
|
|
3773
3821
|
(this.popupObj.element && this.popupObj.element.contains(e.target)))) && e.type !== 'touchstart') {
|
|
3774
3822
|
e.preventDefault();
|
|
3775
3823
|
}
|
|
3776
3824
|
const target = e.target;
|
|
3777
|
-
if (!(closest(target, '.e-datepicker.e-popup-wrapper'))
|
|
3825
|
+
if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
|
|
3778
3826
|
&& !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
|
|
3779
3827
|
&& (!target.classList.contains('e-day'))) {
|
|
3780
3828
|
this.hide(e);
|
|
@@ -3938,7 +3986,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3938
3986
|
}
|
|
3939
3987
|
if ((this.getModuleName() === 'datetimepicker')) {
|
|
3940
3988
|
if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {
|
|
3941
|
-
date = this.globalize.parseDate(this.inputElement.value, dateOptions);
|
|
3989
|
+
date = this.globalize.parseDate(this.inputElement.value.toLocaleUpperCase(), dateOptions);
|
|
3942
3990
|
}
|
|
3943
3991
|
else {
|
|
3944
3992
|
if (this.calendarMode === 'Gregorian') {
|
|
@@ -4410,7 +4458,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4410
4458
|
destroy() {
|
|
4411
4459
|
this.unBindEvents();
|
|
4412
4460
|
super.destroy();
|
|
4413
|
-
this.keyboardModules
|
|
4461
|
+
if (!isNullOrUndefined(this.keyboardModules)) {
|
|
4462
|
+
this.keyboardModules.destroy();
|
|
4463
|
+
}
|
|
4414
4464
|
if (this.popupObj && this.popupObj.element.classList.contains(POPUP)) {
|
|
4415
4465
|
super.destroy();
|
|
4416
4466
|
}
|
|
@@ -4440,15 +4490,21 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4440
4490
|
}
|
|
4441
4491
|
if (this.ngTag === null) {
|
|
4442
4492
|
if (this.inputElement) {
|
|
4443
|
-
this.inputWrapper
|
|
4493
|
+
if (!isNullOrUndefined(this.inputWrapper)) {
|
|
4494
|
+
this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
|
|
4495
|
+
}
|
|
4444
4496
|
removeClass([this.inputElement], [INPUTROOT]);
|
|
4445
4497
|
}
|
|
4446
4498
|
removeClass([this.element], [ROOT$1]);
|
|
4447
|
-
|
|
4499
|
+
if (!isNullOrUndefined(this.inputWrapper)) {
|
|
4500
|
+
detach(this.inputWrapper.container);
|
|
4501
|
+
}
|
|
4448
4502
|
}
|
|
4449
4503
|
if (this.formElement) {
|
|
4450
4504
|
EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
|
|
4451
4505
|
}
|
|
4506
|
+
this.inputWrapper = null;
|
|
4507
|
+
this.keyboardModules = null;
|
|
4452
4508
|
}
|
|
4453
4509
|
ensureInputAttribute() {
|
|
4454
4510
|
const prop = [];
|
|
@@ -4904,7 +4960,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4904
4960
|
}
|
|
4905
4961
|
break;
|
|
4906
4962
|
}
|
|
4907
|
-
if (!this.isDynamicValueChanged
|
|
4963
|
+
if (!this.isDynamicValueChanged) {
|
|
4908
4964
|
this.hide(null);
|
|
4909
4965
|
}
|
|
4910
4966
|
this.isDynamicValueChanged = false;
|
|
@@ -5123,7 +5179,6 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5123
5179
|
this.invalidValueString = null;
|
|
5124
5180
|
this.isAngular = false;
|
|
5125
5181
|
this.preventChange = false;
|
|
5126
|
-
this.isPropChanged = false;
|
|
5127
5182
|
this.dateRangeOptions = options;
|
|
5128
5183
|
}
|
|
5129
5184
|
/**
|
|
@@ -5145,6 +5200,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5145
5200
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
5146
5201
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
5147
5202
|
}
|
|
5203
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
5204
|
+
this.enabled = false;
|
|
5205
|
+
}
|
|
5148
5206
|
this.renderComplete();
|
|
5149
5207
|
}
|
|
5150
5208
|
/**
|
|
@@ -5352,8 +5410,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5352
5410
|
}
|
|
5353
5411
|
for (const pro of Object.keys(attributes$$1)) {
|
|
5354
5412
|
if (pro.indexOf('data') === 0) {
|
|
5355
|
-
this.firstHiddenChild.setAttribute(pro, attributes$$1[pro]);
|
|
5356
|
-
this.secondHiddenChild.setAttribute(pro, attributes$$1[pro]);
|
|
5413
|
+
this.firstHiddenChild.setAttribute(pro, attributes$$1[`${pro}`]);
|
|
5414
|
+
this.secondHiddenChild.setAttribute(pro, attributes$$1[`${pro}`]);
|
|
5357
5415
|
}
|
|
5358
5416
|
}
|
|
5359
5417
|
}
|
|
@@ -5400,19 +5458,19 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5400
5458
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
5401
5459
|
if (wrapperAttr.indexOf(key) > -1) {
|
|
5402
5460
|
if (key === 'class') {
|
|
5403
|
-
const updatedClassValue = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
|
|
5461
|
+
const updatedClassValue = (this.htmlAttributes[`${key}`].replace(/\s+/g, ' ')).trim();
|
|
5404
5462
|
if (updatedClassValue !== '') {
|
|
5405
5463
|
addClass([this.inputWrapper.container], updatedClassValue.split(' '));
|
|
5406
5464
|
}
|
|
5407
5465
|
}
|
|
5408
5466
|
else if (key === 'style') {
|
|
5409
5467
|
let dateRangeStyle = this.inputWrapper.container.getAttribute(key);
|
|
5410
|
-
dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes[key]) :
|
|
5411
|
-
this.htmlAttributes[key];
|
|
5468
|
+
dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes[`${key}`]) :
|
|
5469
|
+
this.htmlAttributes[`${key}`];
|
|
5412
5470
|
this.inputWrapper.container.setAttribute(key, dateRangeStyle);
|
|
5413
5471
|
}
|
|
5414
5472
|
else {
|
|
5415
|
-
this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
|
|
5473
|
+
this.inputWrapper.container.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
5416
5474
|
}
|
|
5417
5475
|
}
|
|
5418
5476
|
}
|
|
@@ -5422,7 +5480,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5422
5480
|
if (!isNullOrUndefined(this.htmlAttributes)) {
|
|
5423
5481
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
5424
5482
|
if (wrapperAttr.indexOf(key) < 0) {
|
|
5425
|
-
this.inputElement.setAttribute(key, this.htmlAttributes[key]);
|
|
5483
|
+
this.inputElement.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
5426
5484
|
}
|
|
5427
5485
|
}
|
|
5428
5486
|
}
|
|
@@ -6055,7 +6113,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6055
6113
|
return ele;
|
|
6056
6114
|
}
|
|
6057
6115
|
navInCalendar(e, isLeftCalendar, leftLimit, rightLimit, ele) {
|
|
6058
|
-
|
|
6116
|
+
let view = this.getViewNumber(this.currentView());
|
|
6059
6117
|
let date;
|
|
6060
6118
|
const min = this.min;
|
|
6061
6119
|
let max;
|
|
@@ -6145,10 +6203,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6145
6203
|
case 'tab':
|
|
6146
6204
|
if (this.tabKeyValidation(ele, LEFTCALENDER)) {
|
|
6147
6205
|
ele = this.keyCalendarUpdate(false, ele, false);
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
this.currentDate = this.firstCellToFocus(this.rightCalendar);
|
|
6151
|
-
}
|
|
6206
|
+
this.currentDate = this.firstCellToFocus(this.rightCalendar);
|
|
6207
|
+
view = this.getViewNumber(this.currentView());
|
|
6152
6208
|
this.keyboardNavigate(0, view, e, max, min);
|
|
6153
6209
|
this.keyNavigation(ele, e);
|
|
6154
6210
|
}
|
|
@@ -6156,10 +6212,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6156
6212
|
case 'shiftTab':
|
|
6157
6213
|
if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
|
|
6158
6214
|
ele = this.keyCalendarUpdate(true, ele, false);
|
|
6159
|
-
|
|
6160
|
-
if (isNullOrUndefined(focusedCell)) {
|
|
6161
|
-
this.currentDate = this.firstCellToFocus(this.leftCalendar);
|
|
6162
|
-
}
|
|
6215
|
+
this.currentDate = this.firstCellToFocus(this.leftCalendar);
|
|
6163
6216
|
this.keyboardNavigate(0, view, e, max, min);
|
|
6164
6217
|
this.keyNavigation(ele, e);
|
|
6165
6218
|
}
|
|
@@ -6167,7 +6220,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6167
6220
|
}
|
|
6168
6221
|
}
|
|
6169
6222
|
firstCellToFocus(calendar) {
|
|
6170
|
-
const focusAbleEle = calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-month)');
|
|
6223
|
+
const focusAbleEle = this.getViewNumber(this.currentView()) === 2 ? calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-year)') : calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-month)');
|
|
6171
6224
|
const focusEleID = focusAbleEle && focusAbleEle.id ? focusAbleEle.id.split('_')[0] : null;
|
|
6172
6225
|
const currentFirstDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), 1);
|
|
6173
6226
|
const focusDate = focusEleID ? new Date(+focusEleID) : currentFirstDay;
|
|
@@ -6394,7 +6447,11 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6394
6447
|
const leftHeader = this.leftCalendar.querySelector('.e-header');
|
|
6395
6448
|
const isRightMonth = rightHeader ? rightHeader.classList.contains('e-month') : false;
|
|
6396
6449
|
const isLeftMonth = leftHeader ? leftHeader.classList.contains('e-month') : false;
|
|
6397
|
-
|
|
6450
|
+
const isRightYear = rightHeader ? rightHeader.classList.contains('e-year') : false;
|
|
6451
|
+
const isLeftYear = leftHeader ? leftHeader.classList.contains('e-year') : false;
|
|
6452
|
+
const isRightDecade = rightHeader ? rightHeader.classList.contains('e-decade') : false;
|
|
6453
|
+
const isLeftDecade = leftHeader ? leftHeader.classList.contains('e-decade') : false;
|
|
6454
|
+
return isLeftCalendar && (isLeftMonth || isLeftYear || isLeftDecade) && (isRightMonth || isRightYear || isRightDecade) && !this.isMobile;
|
|
6398
6455
|
}
|
|
6399
6456
|
keyNavigation(calendar, e) {
|
|
6400
6457
|
this.bindCalendarCellEvents(calendar);
|
|
@@ -8755,6 +8812,30 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
8755
8812
|
this.inputElement.setAttribute('name', this.element.getAttribute('data-name'));
|
|
8756
8813
|
this.inputElement.removeAttribute('data-name');
|
|
8757
8814
|
}
|
|
8815
|
+
this.closeEventArgs = null;
|
|
8816
|
+
this.leftCalendar = null;
|
|
8817
|
+
this.rightTitle = null;
|
|
8818
|
+
this.leftTitle = null;
|
|
8819
|
+
this.openEventArgs = null;
|
|
8820
|
+
this.leftCalNextIcon = null;
|
|
8821
|
+
this.rightCalendar = null;
|
|
8822
|
+
this.closeEventArgs = null;
|
|
8823
|
+
this.rightCalPrevIcon = null;
|
|
8824
|
+
this.leftCalPrevIcon = null;
|
|
8825
|
+
this.popupKeyboardModule = null;
|
|
8826
|
+
this.cancelButton = null;
|
|
8827
|
+
this.applyButton = null;
|
|
8828
|
+
this.calendarElement = null;
|
|
8829
|
+
this.leftKeyboardModule = null;
|
|
8830
|
+
this.rightCalNextIcon = null;
|
|
8831
|
+
this.leftCalNextIcon = null;
|
|
8832
|
+
this.btnKeyboardModule = null;
|
|
8833
|
+
this.rightKeyboardModule = null;
|
|
8834
|
+
this.leftKeyboardModule = null;
|
|
8835
|
+
this.presetKeyboardModule = null;
|
|
8836
|
+
this.liCollections = null;
|
|
8837
|
+
this.popupObj = null;
|
|
8838
|
+
this.popupWrapper = null;
|
|
8758
8839
|
}
|
|
8759
8840
|
ensureInputAttribute() {
|
|
8760
8841
|
const attr = [];
|
|
@@ -9067,6 +9148,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9067
9148
|
const format = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
9068
9149
|
for (const prop of Object.keys(newProp)) {
|
|
9069
9150
|
const openPopup = ['maxDays', 'minDays', 'value'];
|
|
9151
|
+
if (openPopup.indexOf(prop) < 0) {
|
|
9152
|
+
this.hide(null);
|
|
9153
|
+
}
|
|
9070
9154
|
switch (prop) {
|
|
9071
9155
|
case 'width':
|
|
9072
9156
|
this.setEleWidth(this.width);
|
|
@@ -9276,13 +9360,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9276
9360
|
this.setProperties({ depth: newProp.depth }, true);
|
|
9277
9361
|
this.refreshChange();
|
|
9278
9362
|
break;
|
|
9279
|
-
default:
|
|
9280
|
-
this.isPropChanged = true;
|
|
9281
9363
|
}
|
|
9282
|
-
if (openPopup.indexOf(prop) < 0 && !this.isPropChanged) {
|
|
9283
|
-
this.hide(null);
|
|
9284
|
-
}
|
|
9285
|
-
this.isPropChanged = false;
|
|
9286
9364
|
}
|
|
9287
9365
|
}
|
|
9288
9366
|
};
|
|
@@ -9590,6 +9668,9 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9590
9668
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
|
|
9591
9669
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
9592
9670
|
}
|
|
9671
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
9672
|
+
this.enabled = false;
|
|
9673
|
+
}
|
|
9593
9674
|
this.renderComplete();
|
|
9594
9675
|
}
|
|
9595
9676
|
setTimeAllowEdit() {
|
|
@@ -9874,6 +9955,11 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9874
9955
|
if (this.formElement) {
|
|
9875
9956
|
EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
|
|
9876
9957
|
}
|
|
9958
|
+
this.rippleFn = null;
|
|
9959
|
+
this.openPopupEventArgs = null;
|
|
9960
|
+
this.selectedElement = null;
|
|
9961
|
+
this.listTag = null;
|
|
9962
|
+
this.liCollections = null;
|
|
9877
9963
|
}
|
|
9878
9964
|
ensureInputAttribute() {
|
|
9879
9965
|
const propertyList = [];
|
|
@@ -9985,19 +10071,19 @@ let TimePicker = class TimePicker extends Component {
|
|
|
9985
10071
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
9986
10072
|
if (wrapperAttributes.indexOf(key) > -1) {
|
|
9987
10073
|
if (key === 'class') {
|
|
9988
|
-
const updatedClassesValue = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
|
|
10074
|
+
const updatedClassesValue = (this.htmlAttributes[`${key}`].replace(/\s+/g, ' ')).trim();
|
|
9989
10075
|
if (updatedClassesValue !== '') {
|
|
9990
10076
|
addClass([this.inputWrapper.container], updatedClassesValue.split(' '));
|
|
9991
10077
|
}
|
|
9992
10078
|
}
|
|
9993
10079
|
else if (key === 'style') {
|
|
9994
10080
|
let timeStyle = this.inputWrapper.container.getAttribute(key);
|
|
9995
|
-
timeStyle = !isNullOrUndefined(timeStyle) ? (timeStyle + this.htmlAttributes[key]) :
|
|
9996
|
-
this.htmlAttributes[key];
|
|
10081
|
+
timeStyle = !isNullOrUndefined(timeStyle) ? (timeStyle + this.htmlAttributes[`${key}`]) :
|
|
10082
|
+
this.htmlAttributes[`${key}`];
|
|
9997
10083
|
this.inputWrapper.container.setAttribute(key, timeStyle);
|
|
9998
10084
|
}
|
|
9999
10085
|
else {
|
|
10000
|
-
this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
|
|
10086
|
+
this.inputWrapper.container.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
10001
10087
|
}
|
|
10002
10088
|
}
|
|
10003
10089
|
}
|
|
@@ -10007,7 +10093,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10007
10093
|
if (!isNullOrUndefined(this.htmlAttributes)) {
|
|
10008
10094
|
for (const key of Object.keys(this.htmlAttributes)) {
|
|
10009
10095
|
if (wrapperAttributes.indexOf(key) < 0) {
|
|
10010
|
-
this.inputElement.setAttribute(key, this.htmlAttributes[key]);
|
|
10096
|
+
this.inputElement.setAttribute(key, this.htmlAttributes[`${key}`]);
|
|
10011
10097
|
}
|
|
10012
10098
|
}
|
|
10013
10099
|
}
|
|
@@ -10720,7 +10806,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10720
10806
|
this.inputEvent.destroy();
|
|
10721
10807
|
}
|
|
10722
10808
|
EventHandler.remove(this.inputElement, 'mousedown touchstart', this.mouseDownHandler);
|
|
10723
|
-
if (this.showClearButton && !isNullOrUndefined(this.inputWrapper.clearButton)) {
|
|
10809
|
+
if (this.showClearButton && !isNullOrUndefined(this.inputWrapper) && !isNullOrUndefined(this.inputWrapper.clearButton)) {
|
|
10724
10810
|
EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.clearHandler);
|
|
10725
10811
|
}
|
|
10726
10812
|
if (this.formElement) {
|
|
@@ -11082,7 +11168,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11082
11168
|
return elementIndex;
|
|
11083
11169
|
}
|
|
11084
11170
|
keyHandler(event) {
|
|
11085
|
-
if (isNullOrUndefined(this.step) || this.step <= 0 || this.inputWrapper.buttons[0].classList.contains(DISABLED$3)) {
|
|
11171
|
+
if (isNullOrUndefined(this.step) || this.step <= 0 || !isNullOrUndefined(this.inputWrapper) && this.inputWrapper.buttons[0].classList.contains(DISABLED$3)) {
|
|
11086
11172
|
return;
|
|
11087
11173
|
}
|
|
11088
11174
|
const count = this.timeCollections.length;
|
|
@@ -11329,7 +11415,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
11329
11415
|
}
|
|
11330
11416
|
documentClickHandler(event) {
|
|
11331
11417
|
const target = event.target;
|
|
11332
|
-
if ((!isNullOrUndefined(this.popupObj) && (this.inputWrapper.container.contains(target) && event.type !== 'mousedown' ||
|
|
11418
|
+
if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(target) && event.type !== 'mousedown' ||
|
|
11333
11419
|
(this.popupObj.element && this.popupObj.element.contains(target)))) && event.type !== 'touchstart') {
|
|
11334
11420
|
event.preventDefault();
|
|
11335
11421
|
}
|
|
@@ -12049,6 +12135,14 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12049
12135
|
this.keyboardHandler.destroy();
|
|
12050
12136
|
}
|
|
12051
12137
|
this.unBindInputEvents();
|
|
12138
|
+
this.liCollections = null;
|
|
12139
|
+
this.rippleFn = null;
|
|
12140
|
+
this.selectedElement = null;
|
|
12141
|
+
this.listTag = null;
|
|
12142
|
+
this.timeIcon = null;
|
|
12143
|
+
this.popupObject = null;
|
|
12144
|
+
this.preventArgs = null;
|
|
12145
|
+
this.keyboardModule = null;
|
|
12052
12146
|
super.destroy();
|
|
12053
12147
|
}
|
|
12054
12148
|
/**
|
|
@@ -12077,6 +12171,9 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12077
12171
|
this.cloneElement = this.element.cloneNode(true);
|
|
12078
12172
|
this.dateTimeFormat = this.cldrDateTimeFormat();
|
|
12079
12173
|
this.initValue = this.value;
|
|
12174
|
+
if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
|
|
12175
|
+
this.enabled = false;
|
|
12176
|
+
}
|
|
12080
12177
|
super.updateHtmlAttributeToElement();
|
|
12081
12178
|
this.checkAttributes(false);
|
|
12082
12179
|
const localeText = { placeholder: this.placeholder };
|
|
@@ -12465,7 +12562,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12465
12562
|
event.preventDefault();
|
|
12466
12563
|
}
|
|
12467
12564
|
if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
|
|
12468
|
-
&& target !== this.timeIcon && target !== this.inputWrapper.container) {
|
|
12565
|
+
&& target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
|
|
12469
12566
|
if (this.isTimePopupOpen()) {
|
|
12470
12567
|
this.hide(event);
|
|
12471
12568
|
this.focusOut();
|
|
@@ -13339,7 +13436,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13339
13436
|
super.onPropertyChanged(newProp, oldProp);
|
|
13340
13437
|
break;
|
|
13341
13438
|
}
|
|
13342
|
-
if (!this.isDynamicValueChanged
|
|
13439
|
+
if (!this.isDynamicValueChanged) {
|
|
13343
13440
|
this.hide(null);
|
|
13344
13441
|
}
|
|
13345
13442
|
this.isDynamicValueChanged = false;
|
|
@@ -13649,6 +13746,10 @@ class MaskedDateTime {
|
|
|
13649
13746
|
}
|
|
13650
13747
|
if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWUP || args.e.key === ARROWDOWN)) {
|
|
13651
13748
|
let start = this.parent.inputElement.selectionStart;
|
|
13749
|
+
let formatText = '';
|
|
13750
|
+
if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
|
|
13751
|
+
formatText = this.hiddenMask[start];
|
|
13752
|
+
}
|
|
13652
13753
|
this.dateAlteration(args.e.key === ARROWDOWN ? true : false);
|
|
13653
13754
|
let inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
|
|
13654
13755
|
this.isHiddenMask = true;
|
|
@@ -13657,6 +13758,12 @@ class MaskedDateTime {
|
|
|
13657
13758
|
this.previousHiddenMask = this.hiddenMask;
|
|
13658
13759
|
this.previousValue = inputValue;
|
|
13659
13760
|
this.parent.inputElement.value = inputValue;
|
|
13761
|
+
for (var i = 0; i < this.hiddenMask.length; i++) {
|
|
13762
|
+
if (formatText === this.hiddenMask[i]) {
|
|
13763
|
+
start = i;
|
|
13764
|
+
break;
|
|
13765
|
+
}
|
|
13766
|
+
}
|
|
13660
13767
|
this.parent.inputElement.selectionStart = start;
|
|
13661
13768
|
this.validCharacterCheck();
|
|
13662
13769
|
}
|
|
@@ -14050,6 +14157,10 @@ class MaskedDateTime {
|
|
|
14050
14157
|
maskInputHandler() {
|
|
14051
14158
|
let start = this.parent.inputElement.selectionStart;
|
|
14052
14159
|
let selectionChar = this.previousHiddenMask[start - 1];
|
|
14160
|
+
let formatText = '';
|
|
14161
|
+
if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
|
|
14162
|
+
formatText = this.hiddenMask[start];
|
|
14163
|
+
}
|
|
14053
14164
|
let inputValue;
|
|
14054
14165
|
this.differenceCheck();
|
|
14055
14166
|
inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
|
|
@@ -14060,6 +14171,13 @@ class MaskedDateTime {
|
|
|
14060
14171
|
this.previousHiddenMask = this.hiddenMask;
|
|
14061
14172
|
this.previousValue = inputValue;
|
|
14062
14173
|
this.parent.inputElement.value = inputValue;
|
|
14174
|
+
this.parent.inputElement.value = inputValue;
|
|
14175
|
+
for (var i = 0; i < this.hiddenMask.length; i++) {
|
|
14176
|
+
if (formatText === this.hiddenMask[i]) {
|
|
14177
|
+
start = i;
|
|
14178
|
+
break;
|
|
14179
|
+
}
|
|
14180
|
+
}
|
|
14063
14181
|
this.parent.inputElement.selectionStart = start;
|
|
14064
14182
|
this.validCharacterCheck();
|
|
14065
14183
|
if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {
|
|
@@ -14067,6 +14185,9 @@ class MaskedDateTime {
|
|
|
14067
14185
|
this.isNavigate = this.isDeletion = false;
|
|
14068
14186
|
this.navigateSelection(isbackward);
|
|
14069
14187
|
}
|
|
14188
|
+
if (this.isDeleteKey) {
|
|
14189
|
+
this.isDeletion = false;
|
|
14190
|
+
}
|
|
14070
14191
|
this.isDeleteKey = false;
|
|
14071
14192
|
// this.setSelection(selectionChar);
|
|
14072
14193
|
// this.navigateSelection(inputValue);
|