@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.
Files changed (76) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +0 -24
  3. package/dist/ej2-calendars.min.js +2 -2
  4. package/dist/ej2-calendars.umd.min.js +2 -2
  5. package/dist/ej2-calendars.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-calendars.es2015.js +197 -76
  7. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  8. package/dist/es6/ej2-calendars.es5.js +196 -75
  9. package/dist/es6/ej2-calendars.es5.js.map +1 -1
  10. package/dist/global/ej2-calendars.min.js +2 -2
  11. package/dist/global/ej2-calendars.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +10 -10
  14. package/src/calendar/calendar.js +40 -19
  15. package/src/calendar/islamic.js +29 -7
  16. package/src/datepicker/datepicker.js +28 -15
  17. package/src/daterangepicker/daterangepicker.d.ts +0 -1
  18. package/src/daterangepicker/daterangepicker.js +46 -24
  19. package/src/datetimepicker/datetimepicker.js +13 -2
  20. package/src/maskbase/masked-date-time.js +24 -0
  21. package/src/timepicker/timepicker.js +16 -8
  22. package/styles/bootstrap-dark.css +7 -0
  23. package/styles/bootstrap.css +7 -0
  24. package/styles/bootstrap4.css +7 -0
  25. package/styles/bootstrap5-dark.css +8 -1
  26. package/styles/bootstrap5.css +7 -0
  27. package/styles/calendar/_fluent-definition.scss +1 -1
  28. package/styles/calendar/_material-definition.scss +3 -3
  29. package/styles/calendar/_theme.scss +1 -1
  30. package/styles/calendar/bootstrap5-dark.css +1 -1
  31. package/styles/calendar/fabric-dark.css +1 -1
  32. package/styles/calendar/fabric.css +1 -1
  33. package/styles/calendar/fluent-dark.css +3 -3
  34. package/styles/calendar/fluent.css +2 -2
  35. package/styles/calendar/material.css +3 -3
  36. package/styles/daterangepicker/_bootstrap-dark-definition.scss +1 -0
  37. package/styles/daterangepicker/_bootstrap-definition.scss +1 -0
  38. package/styles/daterangepicker/_bootstrap4-definition.scss +1 -0
  39. package/styles/daterangepicker/_bootstrap5-definition.scss +1 -0
  40. package/styles/daterangepicker/_fabric-dark-definition.scss +1 -0
  41. package/styles/daterangepicker/_fabric-definition.scss +1 -0
  42. package/styles/daterangepicker/_fluent-definition.scss +6 -0
  43. package/styles/daterangepicker/_fusionnew-definition.scss +1 -0
  44. package/styles/daterangepicker/_highcontrast-definition.scss +1 -0
  45. package/styles/daterangepicker/_highcontrast-light-definition.scss +1 -0
  46. package/styles/daterangepicker/_layout.scss +6 -0
  47. package/styles/daterangepicker/_material-dark-definition.scss +1 -0
  48. package/styles/daterangepicker/_material-definition.scss +1 -0
  49. package/styles/daterangepicker/_material3-definition.scss +1 -0
  50. package/styles/daterangepicker/_tailwind-definition.scss +1 -0
  51. package/styles/daterangepicker/_theme.scss +33 -0
  52. package/styles/daterangepicker/bootstrap-dark.css +7 -0
  53. package/styles/daterangepicker/bootstrap.css +7 -0
  54. package/styles/daterangepicker/bootstrap4.css +7 -0
  55. package/styles/daterangepicker/bootstrap5-dark.css +7 -0
  56. package/styles/daterangepicker/bootstrap5.css +7 -0
  57. package/styles/daterangepicker/fabric-dark.css +7 -0
  58. package/styles/daterangepicker/fabric.css +7 -0
  59. package/styles/daterangepicker/fluent-dark.css +30 -0
  60. package/styles/daterangepicker/fluent.css +30 -0
  61. package/styles/daterangepicker/highcontrast-light.css +7 -0
  62. package/styles/daterangepicker/highcontrast.css +7 -0
  63. package/styles/daterangepicker/material-dark.css +7 -0
  64. package/styles/daterangepicker/material.css +5 -0
  65. package/styles/daterangepicker/tailwind-dark.css +7 -0
  66. package/styles/daterangepicker/tailwind.css +7 -0
  67. package/styles/fabric-dark.css +8 -1
  68. package/styles/fabric.css +8 -1
  69. package/styles/fluent-dark.css +33 -3
  70. package/styles/fluent.css +32 -2
  71. package/styles/highcontrast-light.css +7 -0
  72. package/styles/highcontrast.css +7 -0
  73. package/styles/material-dark.css +7 -0
  74. package/styles/material.css +8 -3
  75. package/styles/tailwind-dark.css +7 -0
  76. package/styles/tailwind.css +7 -0
@@ -136,6 +136,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
136
136
  'data-role': 'calendar'
137
137
  });
138
138
  }
139
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
140
+ this.enabled = false;
141
+ }
139
142
  this.createHeader();
140
143
  this.createContent();
141
144
  this.wireEvents();
@@ -285,9 +288,11 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
285
288
  else {
286
289
  cldrObj = (this.getCultureObjects(cldrData, '' + this.locale));
287
290
  }
288
- for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
289
- var obj = _a[_i];
290
- culShortNames.push(getValue(obj, cldrObj));
291
+ if (!isNullOrUndefined(cldrObj)) {
292
+ for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
293
+ var obj = _a[_i];
294
+ culShortNames.push(getValue(obj, cldrObj));
295
+ }
291
296
  }
292
297
  return culShortNames;
293
298
  };
@@ -321,9 +326,11 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
321
326
  }
322
327
  }
323
328
  // eslint-disable-next-line max-len
324
- var shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
325
- for (var days = 0; days <= daysCount; days++) {
326
- html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
329
+ var shortNames = this.getCultureValues().length > 0 && this.getCultureValues() ? this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek) : null;
330
+ if (!isNullOrUndefined(shortNames)) {
331
+ for (var days = 0; days <= daysCount; days++) {
332
+ html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
333
+ }
327
334
  }
328
335
  html = '<tr>' + html + '</tr>';
329
336
  this.tableHeadElement.innerHTML = html;
@@ -505,7 +512,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
505
512
  e.preventDefault();
506
513
  break;
507
514
  case 'controlDown':
508
- if (!isNullOrUndefined(focusedDate) || !isNullOrUndefined(selectedDate) && !levelRestrict) {
515
+ if (!isNullOrUndefined(focusedDate) && !levelRestrict || !isNullOrUndefined(selectedDate) && !levelRestrict) {
509
516
  this.contentClick(null, --view, (focusedDate || selectedDate), value);
510
517
  }
511
518
  e.preventDefault();
@@ -1130,9 +1137,6 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1130
1137
  case 0:
1131
1138
  detach(this.tableBodyElement);
1132
1139
  this.renderMonths(e, null, isCustomDate);
1133
- if (multiSelection && !isNullOrUndefined(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0])) {
1134
- this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);
1135
- }
1136
1140
  break;
1137
1141
  case 1:
1138
1142
  detach(this.tableBodyElement);
@@ -1438,7 +1442,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1438
1442
  }
1439
1443
  }
1440
1444
  if (this.getModuleName() === 'calendar' && this.element) {
1441
- EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
1445
+ if (!isNullOrUndefined(this.headerTitleElement)) {
1446
+ EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
1447
+ }
1442
1448
  if (this.todayElement) {
1443
1449
  EventHandler.remove(this.todayElement, 'click', this.todayButtonClick);
1444
1450
  }
@@ -1456,6 +1462,17 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1456
1462
  if (this.element) {
1457
1463
  this.element.innerHTML = '';
1458
1464
  }
1465
+ this.todayElement = null;
1466
+ this.tableBodyElement = null;
1467
+ this.renderDayCellArgs = null;
1468
+ this.headerElement = null;
1469
+ this.nextIcon = null;
1470
+ this.table = null;
1471
+ this.tableHeadElement = null;
1472
+ this.previousIcon = null;
1473
+ this.headerTitleElement = null;
1474
+ this.footer = null;
1475
+ this.contentElement = null;
1459
1476
  _super.prototype.destroy.call(this);
1460
1477
  };
1461
1478
  CalendarBase.prototype.title = function (e) {
@@ -1760,10 +1777,12 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1760
1777
  };
1761
1778
  CalendarBase.prototype.previousIconHandler = function (disabled) {
1762
1779
  if (disabled) {
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');
1780
+ if (!isNullOrUndefined(this.previousIcon)) {
1781
+ EventHandler.remove(this.previousIcon, 'click', this.navigatePreviousHandler);
1782
+ addClass([this.previousIcon], '' + DISABLED);
1783
+ addClass([this.previousIcon], '' + OVERLAY);
1784
+ this.previousIcon.setAttribute('aria-disabled', 'true');
1785
+ }
1767
1786
  }
1768
1787
  else {
1769
1788
  EventHandler.add(this.previousIcon, 'click', this.navigatePreviousHandler);
@@ -1786,10 +1805,12 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1786
1805
  };
1787
1806
  CalendarBase.prototype.nextIconHandler = function (disabled) {
1788
1807
  if (disabled) {
1789
- EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);
1790
- addClass([this.nextIcon], DISABLED);
1791
- addClass([this.nextIcon], OVERLAY);
1792
- this.nextIcon.setAttribute('aria-disabled', 'true');
1808
+ if (!isNullOrUndefined(this.previousIcon)) {
1809
+ EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);
1810
+ addClass([this.nextIcon], DISABLED);
1811
+ addClass([this.nextIcon], OVERLAY);
1812
+ this.nextIcon.setAttribute('aria-disabled', 'true');
1813
+ }
1793
1814
  }
1794
1815
  else {
1795
1816
  EventHandler.add(this.nextIcon, 'click', this.navigateNextHandler);
@@ -2751,8 +2772,11 @@ var Islamic = /** @__PURE__ @class */ (function () {
2751
2772
  }
2752
2773
  break;
2753
2774
  case 'Decade': {
2775
+ var startIslamicYear = 1361;
2776
+ var gregorianValue = HijriParser.toGregorian(startIslamicYear, 1, 1);
2754
2777
  var prevDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.min) < 1;
2755
2778
  var nextDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.max) > -1;
2779
+ prevDecadeCompare = HijriParser.toGregorian(this.calendarInstance.headerTitleElement.textContent.split('-')[0].trim(), 1, 1).getFullYear() === gregorianValue.getFullYear() ? true : prevDecadeCompare;
2756
2780
  this.calendarInstance.previousIconHandler(prevDecadeCompare);
2757
2781
  this.calendarInstance.nextIconHandler(nextDecadeCompare);
2758
2782
  }
@@ -2773,7 +2797,9 @@ var Islamic = /** @__PURE__ @class */ (function () {
2773
2797
  break;
2774
2798
  case 'Decade':
2775
2799
  this.calendarInstance.nextIconClicked = true;
2776
- islamicDate.year = islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1 ? islamicDate.year + 1 : islamicDate.year;
2800
+ if (islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1) {
2801
+ islamicDate.year = islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1 ? islamicDate.year + 1 : islamicDate.year;
2802
+ }
2777
2803
  this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 10, islamicDate.month, 1);
2778
2804
  this.calendarInstance.switchView(view);
2779
2805
  break;
@@ -2863,12 +2889,16 @@ var Islamic = /** @__PURE__ @class */ (function () {
2863
2889
  var endFullYr = endYr.getFullYear();
2864
2890
  var startHdrYr = this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2865
2891
  var endHdrYr = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2892
+ var splityear = this.calendarInstance.headerElement.textContent.split('-');
2893
+ if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') || (!isNullOrUndefined(e) && e.type === 'keydown' && e.action === 'end')) {
2894
+ startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
2895
+ endHdrYr = this.calendarInstance.headerElement.textContent.split('-')[1].trim();
2896
+ }
2866
2897
  if (this.calendarInstance.islamicPreviousHeader) {
2867
2898
  startHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[0].trim();
2868
2899
  endHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[1].trim();
2869
2900
  this.calendarInstance.islamicPreviousHeader = null;
2870
2901
  }
2871
- var splityear = this.calendarInstance.headerElement.textContent.split('-');
2872
2902
  if (this.calendarInstance.previousIconClicked) {
2873
2903
  for (var i = 0; i <= splityear.length; i++) {
2874
2904
  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;
@@ -2876,11 +2906,21 @@ var Islamic = /** @__PURE__ @class */ (function () {
2876
2906
  endHdrYr = (parseInt(endHdrYr) - 1).toString();
2877
2907
  }
2878
2908
  }
2909
+ if (endHdrYr - splityear[i] === 8 || splityear[i] - endHdrYr === 8) {
2910
+ endHdrYr = (parseInt(endHdrYr) - 9).toString();
2911
+ startHdrYr = (parseInt(endHdrYr) - 9).toString();
2912
+ }
2913
+ if (endHdrYr - splityear[i] === 7 || splityear[i] - endHdrYr === 7) {
2914
+ endHdrYr = (parseInt(endHdrYr) - 8).toString();
2915
+ startHdrYr = (parseInt(endHdrYr) - 9).toString();
2916
+ }
2879
2917
  startHdrYr = endHdrYr - startHdrYr === 10
2880
2918
  ? (parseInt(startHdrYr) + 1).toString() : endHdrYr - startHdrYr === 11
2881
2919
  ? (parseInt(startHdrYr) + 2).toString() : endHdrYr - startHdrYr === 12
2882
2920
  ? (parseInt(startHdrYr) + 3).toString() : startHdrYr;
2883
- startHdrYr = endHdrYr - startHdrYr === 8 ? (parseInt(startHdrYr) - 1).toString() : startHdrYr;
2921
+ if (endHdrYr - startHdrYr === 8) {
2922
+ startHdrYr = (parseInt(startHdrYr) - 1).toString();
2923
+ }
2884
2924
  }
2885
2925
  if (this.calendarInstance.nextIconClicked) {
2886
2926
  for (var i = 0; i <= splityear.length; i++) {
@@ -2894,6 +2934,10 @@ var Islamic = /** @__PURE__ @class */ (function () {
2894
2934
  startHdrYr = (parseInt(startHdrYr) + 2).toString();
2895
2935
  }
2896
2936
  }
2937
+ if (startHdrYr - this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim() > 1) {
2938
+ startHdrYr = (parseInt(this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim()) + 1).toString();
2939
+ endHdrYr = (parseInt(startHdrYr) + 9).toString();
2940
+ }
2897
2941
  endHdrYr = endHdrYr - startHdrYr === 10 ? (parseInt(endHdrYr) - 1).toString() : endHdrYr;
2898
2942
  endHdrYr = endHdrYr - startHdrYr === 7
2899
2943
  ? (parseInt(endHdrYr) + 2).toString() : endHdrYr - startHdrYr === 8
@@ -2929,10 +2973,6 @@ var Islamic = /** @__PURE__ @class */ (function () {
2929
2973
  else if (year_1 < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
2930
2974
  || year_1 > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
2931
2975
  addClass([tdEle], DISABLED$1);
2932
- if (year_1 < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
2933
- || year_1 > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
2934
- addClass([tdEle], DISABLED$1);
2935
- }
2936
2976
  }
2937
2977
  else if (!isNullOrUndefined(value) &&
2938
2978
  (this.getIslamicDate(localDate)).year ===
@@ -2948,6 +2988,9 @@ var Islamic = /** @__PURE__ @class */ (function () {
2948
2988
  EventHandler.add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
2949
2989
  }
2950
2990
  tdEle.appendChild(dayLink);
2991
+ if ((!isNullOrUndefined(e) && e.action === 'home' && islamicDate.year.toString() === startHdrYr) || (!isNullOrUndefined(e) && e.action === 'end' && islamicDate.year.toString() === endHdrYr)) {
2992
+ addClass([tdEle], FOCUSEDDATE$1);
2993
+ }
2951
2994
  tdEles.push(tdEle);
2952
2995
  }
2953
2996
  }
@@ -3187,6 +3230,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3187
3230
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
3188
3231
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
3189
3232
  }
3233
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
3234
+ this.enabled = false;
3235
+ }
3190
3236
  this.renderComplete();
3191
3237
  this.setTimeZone(this.serverTimezoneOffset);
3192
3238
  };
@@ -3532,7 +3578,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3532
3578
  }
3533
3579
  };
3534
3580
  DatePicker.prototype.unBindEvents = function () {
3535
- EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler);
3581
+ if (!isNullOrUndefined(this.inputWrapper)) {
3582
+ EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler);
3583
+ }
3536
3584
  EventHandler.remove(this.inputElement, 'mouseup', this.mouseUpHandler);
3537
3585
  EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
3538
3586
  EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
@@ -3664,10 +3712,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3664
3712
  if (!isNullOrUndefined(this.htmlAttributes)) {
3665
3713
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
3666
3714
  var key = _a[_i];
3667
- if (!isNullOrUndefined(this.htmlAttributes[key])) {
3715
+ if (!isNullOrUndefined(this.htmlAttributes["" + key])) {
3668
3716
  if (containerAttr.indexOf(key) > -1) {
3669
3717
  if (key === 'class') {
3670
- var updatedClassValues = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
3718
+ var updatedClassValues = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
3671
3719
  if (updatedClassValues !== '') {
3672
3720
  addClass([this.inputWrapper.container], updatedClassValues.split(' '));
3673
3721
  }
@@ -3676,19 +3724,19 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3676
3724
  var setStyle = this.inputWrapper.container.getAttribute(key);
3677
3725
  if (!isNullOrUndefined(setStyle)) {
3678
3726
  if (setStyle.charAt(setStyle.length - 1) === ';') {
3679
- setStyle = setStyle + this.htmlAttributes[key];
3727
+ setStyle = setStyle + this.htmlAttributes["" + key];
3680
3728
  }
3681
3729
  else {
3682
- setStyle = setStyle + ';' + this.htmlAttributes[key];
3730
+ setStyle = setStyle + ';' + this.htmlAttributes["" + key];
3683
3731
  }
3684
3732
  }
3685
3733
  else {
3686
- setStyle = this.htmlAttributes[key];
3734
+ setStyle = this.htmlAttributes["" + key];
3687
3735
  }
3688
3736
  this.inputWrapper.container.setAttribute(key, setStyle);
3689
3737
  }
3690
3738
  else {
3691
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
3739
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
3692
3740
  }
3693
3741
  }
3694
3742
  }
@@ -3700,7 +3748,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3700
3748
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
3701
3749
  var key = _a[_i];
3702
3750
  if (containerAttr.indexOf(key) < 0) {
3703
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
3751
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
3704
3752
  }
3705
3753
  }
3706
3754
  }
@@ -3812,12 +3860,12 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3812
3860
  this.isPopupClicked = false;
3813
3861
  };
3814
3862
  DatePicker.prototype.documentHandler = function (e) {
3815
- if ((!isNullOrUndefined(this.popupObj) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||
3863
+ if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||
3816
3864
  (this.popupObj.element && this.popupObj.element.contains(e.target)))) && e.type !== 'touchstart') {
3817
3865
  e.preventDefault();
3818
3866
  }
3819
3867
  var target = e.target;
3820
- if (!(closest(target, '.e-datepicker.e-popup-wrapper'))
3868
+ if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
3821
3869
  && !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
3822
3870
  && (!target.classList.contains('e-day'))) {
3823
3871
  this.hide(e);
@@ -3981,7 +4029,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3981
4029
  }
3982
4030
  if ((this.getModuleName() === 'datetimepicker')) {
3983
4031
  if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {
3984
- date = this.globalize.parseDate(this.inputElement.value, dateOptions);
4032
+ date = this.globalize.parseDate(this.inputElement.value.toLocaleUpperCase(), dateOptions);
3985
4033
  }
3986
4034
  else {
3987
4035
  if (this.calendarMode === 'Gregorian') {
@@ -4456,7 +4504,9 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4456
4504
  DatePicker.prototype.destroy = function () {
4457
4505
  this.unBindEvents();
4458
4506
  _super.prototype.destroy.call(this);
4459
- this.keyboardModules.destroy();
4507
+ if (!isNullOrUndefined(this.keyboardModules)) {
4508
+ this.keyboardModules.destroy();
4509
+ }
4460
4510
  if (this.popupObj && this.popupObj.element.classList.contains(POPUP)) {
4461
4511
  _super.prototype.destroy.call(this);
4462
4512
  }
@@ -4486,15 +4536,21 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4486
4536
  }
4487
4537
  if (this.ngTag === null) {
4488
4538
  if (this.inputElement) {
4489
- this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
4539
+ if (!isNullOrUndefined(this.inputWrapper)) {
4540
+ this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
4541
+ }
4490
4542
  removeClass([this.inputElement], [INPUTROOT]);
4491
4543
  }
4492
4544
  removeClass([this.element], [ROOT$1]);
4493
- detach(this.inputWrapper.container);
4545
+ if (!isNullOrUndefined(this.inputWrapper)) {
4546
+ detach(this.inputWrapper.container);
4547
+ }
4494
4548
  }
4495
4549
  if (this.formElement) {
4496
4550
  EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
4497
4551
  }
4552
+ this.inputWrapper = null;
4553
+ this.keyboardModules = null;
4498
4554
  };
4499
4555
  DatePicker.prototype.ensureInputAttribute = function () {
4500
4556
  var prop = [];
@@ -4952,7 +5008,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4952
5008
  }
4953
5009
  break;
4954
5010
  }
4955
- if (!this.isDynamicValueChanged && !this.isIconClicked) {
5011
+ if (!this.isDynamicValueChanged) {
4956
5012
  this.hide(null);
4957
5013
  }
4958
5014
  this.isDynamicValueChanged = false;
@@ -5191,7 +5247,6 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5191
5247
  _this.invalidValueString = null;
5192
5248
  _this.isAngular = false;
5193
5249
  _this.preventChange = false;
5194
- _this.isPropChanged = false;
5195
5250
  _this.dateRangeOptions = options;
5196
5251
  return _this;
5197
5252
  }
@@ -5214,6 +5269,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5214
5269
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
5215
5270
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
5216
5271
  }
5272
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
5273
+ this.enabled = false;
5274
+ }
5217
5275
  this.renderComplete();
5218
5276
  };
5219
5277
  /**
@@ -5422,8 +5480,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5422
5480
  for (var _i = 0, _a = Object.keys(attributes$$1); _i < _a.length; _i++) {
5423
5481
  var pro = _a[_i];
5424
5482
  if (pro.indexOf('data') === 0) {
5425
- this.firstHiddenChild.setAttribute(pro, attributes$$1[pro]);
5426
- this.secondHiddenChild.setAttribute(pro, attributes$$1[pro]);
5483
+ this.firstHiddenChild.setAttribute(pro, attributes$$1["" + pro]);
5484
+ this.secondHiddenChild.setAttribute(pro, attributes$$1["" + pro]);
5427
5485
  }
5428
5486
  }
5429
5487
  };
@@ -5471,19 +5529,19 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5471
5529
  var key = _a[_i];
5472
5530
  if (wrapperAttr.indexOf(key) > -1) {
5473
5531
  if (key === 'class') {
5474
- var updatedClassValue = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
5532
+ var updatedClassValue = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
5475
5533
  if (updatedClassValue !== '') {
5476
5534
  addClass([this.inputWrapper.container], updatedClassValue.split(' '));
5477
5535
  }
5478
5536
  }
5479
5537
  else if (key === 'style') {
5480
5538
  var dateRangeStyle = this.inputWrapper.container.getAttribute(key);
5481
- dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes[key]) :
5482
- this.htmlAttributes[key];
5539
+ dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes["" + key]) :
5540
+ this.htmlAttributes["" + key];
5483
5541
  this.inputWrapper.container.setAttribute(key, dateRangeStyle);
5484
5542
  }
5485
5543
  else {
5486
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
5544
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
5487
5545
  }
5488
5546
  }
5489
5547
  }
@@ -5494,7 +5552,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5494
5552
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
5495
5553
  var key = _a[_i];
5496
5554
  if (wrapperAttr.indexOf(key) < 0) {
5497
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
5555
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
5498
5556
  }
5499
5557
  }
5500
5558
  }
@@ -6220,10 +6278,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6220
6278
  case 'tab':
6221
6279
  if (this.tabKeyValidation(ele, LEFTCALENDER)) {
6222
6280
  ele = this.keyCalendarUpdate(false, ele, false);
6223
- var focusedCell = ele.querySelector('.e-focused-date');
6224
- if (isNullOrUndefined(focusedCell)) {
6225
- this.currentDate = this.firstCellToFocus(this.rightCalendar);
6226
- }
6281
+ this.currentDate = this.firstCellToFocus(this.rightCalendar);
6282
+ view = this.getViewNumber(this.currentView());
6227
6283
  this.keyboardNavigate(0, view, e, max, min);
6228
6284
  this.keyNavigation(ele, e);
6229
6285
  }
@@ -6231,10 +6287,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6231
6287
  case 'shiftTab':
6232
6288
  if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
6233
6289
  ele = this.keyCalendarUpdate(true, ele, false);
6234
- var focusedCell = ele.querySelector('.e-focused-date');
6235
- if (isNullOrUndefined(focusedCell)) {
6236
- this.currentDate = this.firstCellToFocus(this.leftCalendar);
6237
- }
6290
+ this.currentDate = this.firstCellToFocus(this.leftCalendar);
6238
6291
  this.keyboardNavigate(0, view, e, max, min);
6239
6292
  this.keyNavigation(ele, e);
6240
6293
  }
@@ -6242,7 +6295,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6242
6295
  }
6243
6296
  };
6244
6297
  DateRangePicker.prototype.firstCellToFocus = function (calendar) {
6245
- var focusAbleEle = calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-month)');
6298
+ var 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)');
6246
6299
  var focusEleID = focusAbleEle && focusAbleEle.id ? focusAbleEle.id.split('_')[0] : null;
6247
6300
  var currentFirstDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), 1);
6248
6301
  var focusDate = focusEleID ? new Date(+focusEleID) : currentFirstDay;
@@ -6469,7 +6522,11 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6469
6522
  var leftHeader = this.leftCalendar.querySelector('.e-header');
6470
6523
  var isRightMonth = rightHeader ? rightHeader.classList.contains('e-month') : false;
6471
6524
  var isLeftMonth = leftHeader ? leftHeader.classList.contains('e-month') : false;
6472
- return isLeftCalendar && isLeftMonth && isRightMonth && !this.isMobile;
6525
+ var isRightYear = rightHeader ? rightHeader.classList.contains('e-year') : false;
6526
+ var isLeftYear = leftHeader ? leftHeader.classList.contains('e-year') : false;
6527
+ var isRightDecade = rightHeader ? rightHeader.classList.contains('e-decade') : false;
6528
+ var isLeftDecade = leftHeader ? leftHeader.classList.contains('e-decade') : false;
6529
+ return isLeftCalendar && (isLeftMonth || isLeftYear || isLeftDecade) && (isRightMonth || isRightYear || isRightDecade) && !this.isMobile;
6473
6530
  };
6474
6531
  DateRangePicker.prototype.keyNavigation = function (calendar, e) {
6475
6532
  this.bindCalendarCellEvents(calendar);
@@ -8846,6 +8903,30 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
8846
8903
  this.inputElement.setAttribute('name', this.element.getAttribute('data-name'));
8847
8904
  this.inputElement.removeAttribute('data-name');
8848
8905
  }
8906
+ this.closeEventArgs = null;
8907
+ this.leftCalendar = null;
8908
+ this.rightTitle = null;
8909
+ this.leftTitle = null;
8910
+ this.openEventArgs = null;
8911
+ this.leftCalNextIcon = null;
8912
+ this.rightCalendar = null;
8913
+ this.closeEventArgs = null;
8914
+ this.rightCalPrevIcon = null;
8915
+ this.leftCalPrevIcon = null;
8916
+ this.popupKeyboardModule = null;
8917
+ this.cancelButton = null;
8918
+ this.applyButton = null;
8919
+ this.calendarElement = null;
8920
+ this.leftKeyboardModule = null;
8921
+ this.rightCalNextIcon = null;
8922
+ this.leftCalNextIcon = null;
8923
+ this.btnKeyboardModule = null;
8924
+ this.rightKeyboardModule = null;
8925
+ this.leftKeyboardModule = null;
8926
+ this.presetKeyboardModule = null;
8927
+ this.liCollections = null;
8928
+ this.popupObj = null;
8929
+ this.popupWrapper = null;
8849
8930
  };
8850
8931
  DateRangePicker.prototype.ensureInputAttribute = function () {
8851
8932
  var attr = [];
@@ -9161,6 +9242,9 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9161
9242
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
9162
9243
  var prop = _a[_i];
9163
9244
  var openPopup = ['maxDays', 'minDays', 'value'];
9245
+ if (openPopup.indexOf(prop) < 0) {
9246
+ this.hide(null);
9247
+ }
9164
9248
  switch (prop) {
9165
9249
  case 'width':
9166
9250
  this.setEleWidth(this.width);
@@ -9370,13 +9454,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9370
9454
  this.setProperties({ depth: newProp.depth }, true);
9371
9455
  this.refreshChange();
9372
9456
  break;
9373
- default:
9374
- this.isPropChanged = true;
9375
- }
9376
- if (openPopup.indexOf(prop) < 0 && !this.isPropChanged) {
9377
- this.hide(null);
9378
9457
  }
9379
- this.isPropChanged = false;
9380
9458
  }
9381
9459
  };
9382
9460
  __decorate$2([
@@ -9705,6 +9783,9 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
9705
9783
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
9706
9784
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
9707
9785
  }
9786
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
9787
+ this.enabled = false;
9788
+ }
9708
9789
  this.renderComplete();
9709
9790
  };
9710
9791
  TimePicker.prototype.setTimeAllowEdit = function () {
@@ -9989,6 +10070,11 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
9989
10070
  if (this.formElement) {
9990
10071
  EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
9991
10072
  }
10073
+ this.rippleFn = null;
10074
+ this.openPopupEventArgs = null;
10075
+ this.selectedElement = null;
10076
+ this.listTag = null;
10077
+ this.liCollections = null;
9992
10078
  };
9993
10079
  TimePicker.prototype.ensureInputAttribute = function () {
9994
10080
  var propertyList = [];
@@ -10102,19 +10188,19 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10102
10188
  var key = _a[_i];
10103
10189
  if (wrapperAttributes.indexOf(key) > -1) {
10104
10190
  if (key === 'class') {
10105
- var updatedClassesValue = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
10191
+ var updatedClassesValue = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
10106
10192
  if (updatedClassesValue !== '') {
10107
10193
  addClass([this.inputWrapper.container], updatedClassesValue.split(' '));
10108
10194
  }
10109
10195
  }
10110
10196
  else if (key === 'style') {
10111
10197
  var timeStyle = this.inputWrapper.container.getAttribute(key);
10112
- timeStyle = !isNullOrUndefined(timeStyle) ? (timeStyle + this.htmlAttributes[key]) :
10113
- this.htmlAttributes[key];
10198
+ timeStyle = !isNullOrUndefined(timeStyle) ? (timeStyle + this.htmlAttributes["" + key]) :
10199
+ this.htmlAttributes["" + key];
10114
10200
  this.inputWrapper.container.setAttribute(key, timeStyle);
10115
10201
  }
10116
10202
  else {
10117
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
10203
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
10118
10204
  }
10119
10205
  }
10120
10206
  }
@@ -10125,7 +10211,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10125
10211
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
10126
10212
  var key = _a[_i];
10127
10213
  if (wrapperAttributes.indexOf(key) < 0) {
10128
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
10214
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
10129
10215
  }
10130
10216
  }
10131
10217
  }
@@ -10839,7 +10925,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10839
10925
  this.inputEvent.destroy();
10840
10926
  }
10841
10927
  EventHandler.remove(this.inputElement, 'mousedown touchstart', this.mouseDownHandler);
10842
- if (this.showClearButton && !isNullOrUndefined(this.inputWrapper.clearButton)) {
10928
+ if (this.showClearButton && !isNullOrUndefined(this.inputWrapper) && !isNullOrUndefined(this.inputWrapper.clearButton)) {
10843
10929
  EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.clearHandler);
10844
10930
  }
10845
10931
  if (this.formElement) {
@@ -11202,7 +11288,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11202
11288
  return elementIndex;
11203
11289
  };
11204
11290
  TimePicker.prototype.keyHandler = function (event) {
11205
- if (isNullOrUndefined(this.step) || this.step <= 0 || this.inputWrapper.buttons[0].classList.contains(DISABLED$3)) {
11291
+ if (isNullOrUndefined(this.step) || this.step <= 0 || !isNullOrUndefined(this.inputWrapper) && this.inputWrapper.buttons[0].classList.contains(DISABLED$3)) {
11206
11292
  return;
11207
11293
  }
11208
11294
  var count = this.timeCollections.length;
@@ -11450,7 +11536,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11450
11536
  };
11451
11537
  TimePicker.prototype.documentClickHandler = function (event) {
11452
11538
  var target = event.target;
11453
- if ((!isNullOrUndefined(this.popupObj) && (this.inputWrapper.container.contains(target) && event.type !== 'mousedown' ||
11539
+ if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(target) && event.type !== 'mousedown' ||
11454
11540
  (this.popupObj.element && this.popupObj.element.contains(target)))) && event.type !== 'touchstart') {
11455
11541
  event.preventDefault();
11456
11542
  }
@@ -12188,6 +12274,14 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12188
12274
  this.keyboardHandler.destroy();
12189
12275
  }
12190
12276
  this.unBindInputEvents();
12277
+ this.liCollections = null;
12278
+ this.rippleFn = null;
12279
+ this.selectedElement = null;
12280
+ this.listTag = null;
12281
+ this.timeIcon = null;
12282
+ this.popupObject = null;
12283
+ this.preventArgs = null;
12284
+ this.keyboardModule = null;
12191
12285
  _super.prototype.destroy.call(this);
12192
12286
  };
12193
12287
  /**
@@ -12216,6 +12310,9 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12216
12310
  this.cloneElement = this.element.cloneNode(true);
12217
12311
  this.dateTimeFormat = this.cldrDateTimeFormat();
12218
12312
  this.initValue = this.value;
12313
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
12314
+ this.enabled = false;
12315
+ }
12219
12316
  _super.prototype.updateHtmlAttributeToElement.call(this);
12220
12317
  this.checkAttributes(false);
12221
12318
  var localeText = { placeholder: this.placeholder };
@@ -12605,7 +12702,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12605
12702
  event.preventDefault();
12606
12703
  }
12607
12704
  if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
12608
- && target !== this.timeIcon && target !== this.inputWrapper.container) {
12705
+ && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
12609
12706
  if (this.isTimePopupOpen()) {
12610
12707
  this.hide(event);
12611
12708
  this.focusOut();
@@ -13483,7 +13580,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13483
13580
  _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
13484
13581
  break;
13485
13582
  }
13486
- if (!this.isDynamicValueChanged && !this.isIconClicked) {
13583
+ if (!this.isDynamicValueChanged) {
13487
13584
  this.hide(null);
13488
13585
  }
13489
13586
  this.isDynamicValueChanged = false;
@@ -13794,6 +13891,10 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13794
13891
  }
13795
13892
  if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWUP || args.e.key === ARROWDOWN)) {
13796
13893
  var start = this.parent.inputElement.selectionStart;
13894
+ var formatText = '';
13895
+ if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
13896
+ formatText = this.hiddenMask[start];
13897
+ }
13797
13898
  this.dateAlteration(args.e.key === ARROWDOWN ? true : false);
13798
13899
  var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
13799
13900
  this.isHiddenMask = true;
@@ -13802,6 +13903,12 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13802
13903
  this.previousHiddenMask = this.hiddenMask;
13803
13904
  this.previousValue = inputValue;
13804
13905
  this.parent.inputElement.value = inputValue;
13906
+ for (var i = 0; i < this.hiddenMask.length; i++) {
13907
+ if (formatText === this.hiddenMask[i]) {
13908
+ start = i;
13909
+ break;
13910
+ }
13911
+ }
13805
13912
  this.parent.inputElement.selectionStart = start;
13806
13913
  this.validCharacterCheck();
13807
13914
  }
@@ -14196,6 +14303,10 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14196
14303
  MaskedDateTime.prototype.maskInputHandler = function () {
14197
14304
  var start = this.parent.inputElement.selectionStart;
14198
14305
  var selectionChar = this.previousHiddenMask[start - 1];
14306
+ var formatText = '';
14307
+ if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
14308
+ formatText = this.hiddenMask[start];
14309
+ }
14199
14310
  var inputValue;
14200
14311
  this.differenceCheck();
14201
14312
  inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
@@ -14206,6 +14317,13 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14206
14317
  this.previousHiddenMask = this.hiddenMask;
14207
14318
  this.previousValue = inputValue;
14208
14319
  this.parent.inputElement.value = inputValue;
14320
+ this.parent.inputElement.value = inputValue;
14321
+ for (var i = 0; i < this.hiddenMask.length; i++) {
14322
+ if (formatText === this.hiddenMask[i]) {
14323
+ start = i;
14324
+ break;
14325
+ }
14326
+ }
14209
14327
  this.parent.inputElement.selectionStart = start;
14210
14328
  this.validCharacterCheck();
14211
14329
  if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {
@@ -14213,6 +14331,9 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14213
14331
  this.isNavigate = this.isDeletion = false;
14214
14332
  this.navigateSelection(isbackward);
14215
14333
  }
14334
+ if (this.isDeleteKey) {
14335
+ this.isDeletion = false;
14336
+ }
14216
14337
  this.isDeleteKey = false;
14217
14338
  // this.setSelection(selectionChar);
14218
14339
  // this.navigateSelection(inputValue);