@syncfusion/ej2-calendars 20.4.52 → 21.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.
Files changed (184) hide show
  1. package/CHANGELOG.md +0 -12
  2. package/README.md +94 -83
  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 +436 -376
  7. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  8. package/dist/es6/ej2-calendars.es5.js +392 -331
  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 +11 -11
  14. package/src/calendar/calendar-model.d.ts +1 -1
  15. package/src/calendar/calendar.js +13 -6
  16. package/src/calendar/islamic.js +39 -29
  17. package/src/datepicker/datepicker-model.d.ts +3 -3
  18. package/src/datepicker/datepicker.js +61 -56
  19. package/src/daterangepicker/daterangepicker.js +11 -5
  20. package/src/datetimepicker/datetimepicker-model.d.ts +3 -3
  21. package/src/datetimepicker/datetimepicker.d.ts +4 -4
  22. package/src/datetimepicker/datetimepicker.js +15 -17
  23. package/src/maskbase/masked-date-time.js +212 -181
  24. package/src/timepicker/timepicker-model.d.ts +7 -7
  25. package/src/timepicker/timepicker.d.ts +9 -9
  26. package/src/timepicker/timepicker.js +41 -38
  27. package/styles/bootstrap-dark.css +13 -12
  28. package/styles/bootstrap.css +13 -7
  29. package/styles/bootstrap4.css +7 -5
  30. package/styles/bootstrap5-dark.css +21 -19
  31. package/styles/bootstrap5.css +19 -17
  32. package/styles/calendar/_bootstrap-dark-definition.scss +1 -1
  33. package/styles/calendar/_bootstrap5-definition.scss +21 -21
  34. package/styles/calendar/_fabric-dark-definition.scss +5 -3
  35. package/styles/calendar/_fabric-definition.scss +2 -0
  36. package/styles/calendar/_fluent-definition.scss +36 -36
  37. package/styles/calendar/_highcontrast-definition.scss +3 -1
  38. package/styles/calendar/_highcontrast-light-definition.scss +2 -0
  39. package/styles/calendar/_layout.scss +53 -6
  40. package/styles/calendar/_material-dark-definition.scss +4 -2
  41. package/styles/calendar/_material-definition.scss +2 -0
  42. package/styles/calendar/_tailwind-definition.scss +13 -13
  43. package/styles/calendar/_theme.scss +74 -13
  44. package/styles/calendar/bootstrap-dark.css +4 -3
  45. package/styles/calendar/bootstrap.css +3 -2
  46. package/styles/calendar/bootstrap4.css +3 -2
  47. package/styles/calendar/bootstrap5-dark.css +14 -13
  48. package/styles/calendar/bootstrap5.css +13 -12
  49. package/styles/calendar/fabric-dark.css +15 -5
  50. package/styles/calendar/fabric.css +12 -2
  51. package/styles/calendar/fluent-dark.css +51 -28
  52. package/styles/calendar/fluent.css +51 -28
  53. package/styles/calendar/highcontrast-light.css +3 -2
  54. package/styles/calendar/highcontrast.css +14 -4
  55. package/styles/calendar/icons/_material3.scss +3 -3
  56. package/styles/calendar/material-dark.css +14 -4
  57. package/styles/calendar/material.css +12 -2
  58. package/styles/calendar/tailwind-dark.css +11 -10
  59. package/styles/calendar/tailwind.css +11 -10
  60. package/styles/datepicker/_bootstrap-dark-definition.scss +1 -1
  61. package/styles/datepicker/_bootstrap-definition.scss +1 -1
  62. package/styles/datepicker/_bootstrap5-definition.scss +8 -8
  63. package/styles/datepicker/_fabric-dark-definition.scss +1 -1
  64. package/styles/datepicker/_fabric-definition.scss +1 -1
  65. package/styles/datepicker/_fluent-definition.scss +8 -8
  66. package/styles/datepicker/_fusionnew-definition.scss +2 -2
  67. package/styles/datepicker/_highcontrast-definition.scss +1 -1
  68. package/styles/datepicker/_highcontrast-light-definition.scss +1 -1
  69. package/styles/datepicker/_layout.scss +16 -6
  70. package/styles/datepicker/_material-dark-definition.scss +1 -1
  71. package/styles/datepicker/_material-definition.scss +1 -1
  72. package/styles/datepicker/_tailwind-definition.scss +8 -8
  73. package/styles/datepicker/_theme.scss +11 -1
  74. package/styles/datepicker/bootstrap-dark.css +1 -1
  75. package/styles/datepicker/bootstrap.css +1 -1
  76. package/styles/datepicker/bootstrap5-dark.css +2 -2
  77. package/styles/datepicker/bootstrap5.css +2 -2
  78. package/styles/datepicker/fabric-dark.css +1 -1
  79. package/styles/datepicker/fabric.css +1 -1
  80. package/styles/datepicker/fluent-dark.css +2 -2
  81. package/styles/datepicker/fluent.css +2 -2
  82. package/styles/datepicker/highcontrast-light.css +1 -1
  83. package/styles/datepicker/highcontrast.css +1 -1
  84. package/styles/datepicker/icons/_material3.scss +3 -3
  85. package/styles/datepicker/material-dark.css +1 -1
  86. package/styles/datepicker/material.css +1 -1
  87. package/styles/datepicker/tailwind-dark.css +2 -2
  88. package/styles/datepicker/tailwind.css +2 -2
  89. package/styles/daterangepicker/_bootstrap-dark-definition.scss +6 -6
  90. package/styles/daterangepicker/_bootstrap-definition.scss +2 -2
  91. package/styles/daterangepicker/_bootstrap4-definition.scss +2 -2
  92. package/styles/daterangepicker/_bootstrap5-definition.scss +21 -21
  93. package/styles/daterangepicker/_fabric-dark-definition.scss +2 -2
  94. package/styles/daterangepicker/_fabric-definition.scss +2 -2
  95. package/styles/daterangepicker/_fluent-definition.scss +27 -27
  96. package/styles/daterangepicker/_highcontrast-definition.scss +2 -2
  97. package/styles/daterangepicker/_highcontrast-light-definition.scss +2 -2
  98. package/styles/daterangepicker/_layout.scss +50 -3
  99. package/styles/daterangepicker/_material-dark-definition.scss +2 -2
  100. package/styles/daterangepicker/_material-definition.scss +2 -2
  101. package/styles/daterangepicker/_tailwind-definition.scss +19 -19
  102. package/styles/daterangepicker/_theme.scss +93 -15
  103. package/styles/daterangepicker/bootstrap-dark.css +6 -6
  104. package/styles/daterangepicker/bootstrap.css +7 -2
  105. package/styles/daterangepicker/bootstrap4.css +3 -2
  106. package/styles/daterangepicker/bootstrap5-dark.css +5 -4
  107. package/styles/daterangepicker/bootstrap5.css +4 -3
  108. package/styles/daterangepicker/fabric-dark.css +2 -2
  109. package/styles/daterangepicker/fabric.css +2 -2
  110. package/styles/daterangepicker/fluent-dark.css +33 -9
  111. package/styles/daterangepicker/fluent.css +33 -9
  112. package/styles/daterangepicker/highcontrast-light.css +2 -2
  113. package/styles/daterangepicker/highcontrast.css +2 -2
  114. package/styles/daterangepicker/icons/_material3.scss +33 -6
  115. package/styles/daterangepicker/material-dark.css +2 -2
  116. package/styles/daterangepicker/material.css +9 -3
  117. package/styles/daterangepicker/tailwind-dark.css +2 -2
  118. package/styles/daterangepicker/tailwind.css +2 -2
  119. package/styles/datetimepicker/_bootstrap-dark-definition.scss +1 -1
  120. package/styles/datetimepicker/_bootstrap-definition.scss +1 -1
  121. package/styles/datetimepicker/_bootstrap4-definition.scss +1 -1
  122. package/styles/datetimepicker/_bootstrap5-definition.scss +1 -1
  123. package/styles/datetimepicker/_fabric-dark-definition.scss +1 -1
  124. package/styles/datetimepicker/_fabric-definition.scss +1 -1
  125. package/styles/datetimepicker/_fluent-definition.scss +1 -1
  126. package/styles/datetimepicker/_highcontrast-definition.scss +1 -1
  127. package/styles/datetimepicker/_highcontrast-light-definition.scss +1 -1
  128. package/styles/datetimepicker/_layout.scss +8 -3
  129. package/styles/datetimepicker/_material-dark-definition.scss +1 -1
  130. package/styles/datetimepicker/_material-definition.scss +1 -1
  131. package/styles/datetimepicker/_tailwind-definition.scss +1 -1
  132. package/styles/datetimepicker/_theme.scss +24 -4
  133. package/styles/datetimepicker/bootstrap-dark.css +1 -1
  134. package/styles/datetimepicker/bootstrap.css +1 -1
  135. package/styles/datetimepicker/bootstrap4.css +1 -1
  136. package/styles/datetimepicker/fabric-dark.css +1 -1
  137. package/styles/datetimepicker/fabric.css +1 -1
  138. package/styles/datetimepicker/highcontrast-light.css +1 -1
  139. package/styles/datetimepicker/highcontrast.css +1 -1
  140. package/styles/datetimepicker/icons/_material3.scss +1 -1
  141. package/styles/datetimepicker/material-dark.css +1 -1
  142. package/styles/datetimepicker/material.css +1 -1
  143. package/styles/fabric-dark.css +20 -10
  144. package/styles/fabric.css +20 -8
  145. package/styles/fluent-dark.css +86 -39
  146. package/styles/fluent.css +86 -39
  147. package/styles/highcontrast-light.css +8 -7
  148. package/styles/highcontrast.css +19 -9
  149. package/styles/material-dark.css +19 -9
  150. package/styles/material.css +24 -8
  151. package/styles/tailwind-dark.css +15 -14
  152. package/styles/tailwind.css +15 -14
  153. package/styles/timepicker/_bootstrap-dark-definition.scss +2 -1
  154. package/styles/timepicker/_bootstrap-definition.scss +2 -1
  155. package/styles/timepicker/_bootstrap4-definition.scss +1 -0
  156. package/styles/timepicker/_bootstrap5-definition.scss +6 -5
  157. package/styles/timepicker/_fabric-dark-definition.scss +2 -1
  158. package/styles/timepicker/_fabric-definition.scss +2 -1
  159. package/styles/timepicker/_fluent-definition.scss +6 -5
  160. package/styles/timepicker/_fusionnew-definition.scss +1 -0
  161. package/styles/timepicker/_highcontrast-definition.scss +2 -1
  162. package/styles/timepicker/_highcontrast-light-definition.scss +2 -1
  163. package/styles/timepicker/_layout.scss +11 -3
  164. package/styles/timepicker/_material-dark-definition.scss +2 -1
  165. package/styles/timepicker/_material-definition.scss +2 -1
  166. package/styles/timepicker/_tailwind-definition.scss +6 -5
  167. package/styles/timepicker/_theme.scss +36 -6
  168. package/styles/timepicker/bootstrap-dark.css +1 -1
  169. package/styles/timepicker/bootstrap.css +1 -1
  170. package/styles/timepicker/fabric-dark.css +1 -1
  171. package/styles/timepicker/fabric.css +1 -1
  172. package/styles/timepicker/highcontrast-light.css +1 -1
  173. package/styles/timepicker/highcontrast.css +1 -1
  174. package/styles/timepicker/icons/_material3.scss +1 -1
  175. package/styles/timepicker/material-dark.css +1 -1
  176. package/styles/timepicker/material.css +1 -1
  177. package/GitLeaksReport.json +0 -1
  178. package/gitleaks-ci/gitleaks +0 -0
  179. package/gitleaks-ci.tar.gz +0 -0
  180. package/styles/calendar/_material3-definition.scss +0 -250
  181. package/styles/datepicker/_material3-definition.scss +0 -46
  182. package/styles/daterangepicker/_material3-definition.scss +0 -230
  183. package/styles/datetimepicker/_material3-definition.scss +0 -60
  184. package/styles/timepicker/_material3-definition.scss +0 -57
@@ -23,6 +23,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
23
23
  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;
24
24
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25
25
  };
26
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
26
27
  //class constant defination.
27
28
  var OTHERMONTH = 'e-other-month';
28
29
  var OTHERDECADE = 'e-other-year';
@@ -136,7 +137,7 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
136
137
  'data-role': 'calendar'
137
138
  });
138
139
  }
139
- if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
140
+ if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
140
141
  this.enabled = false;
141
142
  }
142
143
  this.createHeader();
@@ -442,7 +443,8 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
442
443
  this.footer && detach(this.footer);
443
444
  this.todayElement = null;
444
445
  this.renderDayCellArgs = null;
445
- this.calendarElement = this.tableBodyElement = this.footer = this.tableHeadElement = this.nextIcon = this.previousIcon = this.table = null;
446
+ this.calendarElement = this.tableBodyElement = this.footer = this.tableHeadElement =
447
+ this.nextIcon = this.previousIcon = this.table = null;
446
448
  };
447
449
  CalendarBase.prototype.keyActionHandle = function (e, value, multiSelection) {
448
450
  var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');
@@ -763,8 +765,9 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
763
765
  // if (args.isDisabled && +this.value === +args.date) {
764
766
  // this.setProperties({ value: null }, true);
765
767
  // }
768
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
766
769
  var currentTarget = void 0;
767
- if (!isNullOrUndefined(e) && e.type == 'click') {
770
+ if (!isNullOrUndefined(e) && e.type === 'click') {
768
771
  currentTarget = e.currentTarget;
769
772
  }
770
773
  if (multiSelection && !isNullOrUndefined(values) && !disabledCls) {
@@ -777,7 +780,8 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
777
780
  || (this.getDateVal(localDate, value))) {
778
781
  addClass([tdEle], SELECTED);
779
782
  }
780
- if (!isNullOrUndefined(currentTarget) && currentTarget.innerText === tdEle.innerText && this.previousDates && tdEle.classList.contains(SELECTED) && currentTarget.classList.contains(SELECTED)) {
783
+ if (!isNullOrUndefined(currentTarget) && currentTarget.innerText === tdEle.innerText &&
784
+ this.previousDates && tdEle.classList.contains(SELECTED) && currentTarget.classList.contains(SELECTED)) {
781
785
  removeClass([tdEle], SELECTED);
782
786
  this.previousDates = false;
783
787
  var copyValues = this.copyValues(values);
@@ -1028,7 +1032,8 @@ var CalendarBase = /** @__PURE__ @class */ (function (_super) {
1028
1032
  if (this.weekNumber && rowIterator === otherMonthCell + 1 && elements[otherMonthCell + 1].classList.contains(OTHERMONTH)) {
1029
1033
  addClass([trEle], OTHERMONTHROW);
1030
1034
  }
1031
- if (!this.weekNumber && rowIterator === otherMonthCell && elements[otherMonthCell].classList.contains(OTHERMONTH)) {
1035
+ if (!this.weekNumber && rowIterator === otherMonthCell && elements[otherMonthCell].
1036
+ classList.contains(OTHERMONTH)) {
1032
1037
  addClass([trEle], OTHERMONTHROW);
1033
1038
  }
1034
1039
  if (this.weekNumber) {
@@ -2568,7 +2573,9 @@ var Calendar = /** @__PURE__ @class */ (function (_super) {
2568
2573
  if (!isNullOrUndefined(this.value)) {
2569
2574
  this.setProperties({ value: this.value }, true);
2570
2575
  }
2571
- if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) && !isNullOrUndefined(this.previousDate) || this.previousDate == null
2576
+ // eslint-disable-next-line use-isnan
2577
+ if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&
2578
+ !isNullOrUndefined(this.previousDate) || this.previousDate === null
2572
2579
  && !isNaN(+this.value))) {
2573
2580
  this.changeEvent(e);
2574
2581
  }
@@ -2900,55 +2907,62 @@ var Islamic = /** @__PURE__ @class */ (function () {
2900
2907
  this.calendarInstance.islamicPreviousHeader = null;
2901
2908
  }
2902
2909
  if (this.calendarInstance.previousIconClicked) {
2910
+ // eslint-disable-next-line no-var
2903
2911
  for (var i = 0; i <= splityear.length; i++) {
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;
2912
+ endHdrYr = endHdrYr - splityear[i] === 2 || splityear[i]
2913
+ - endHdrYr === 2 ? (parseInt(endHdrYr, 10) + 1).toString() :
2914
+ endHdrYr - splityear[i] === 3 || splityear[i] - endHdrYr === 3 ?
2915
+ (parseInt(endHdrYr, 10) + 2).toString() : endHdrYr - splityear[i] === 4 ||
2916
+ splityear[i] - endHdrYr === 4 ? (parseInt(endHdrYr, 10) + 3).toString() :
2917
+ endHdrYr - splityear[i] === 5 || splityear[i] - endHdrYr === 5 ?
2918
+ (parseInt(endHdrYr, 10) + 4).toString() : endHdrYr;
2905
2919
  if (endHdrYr - splityear[i] === 0 || splityear[i] - endHdrYr === 0) {
2906
- endHdrYr = (parseInt(endHdrYr) - 1).toString();
2920
+ endHdrYr = (parseInt(endHdrYr, 10) - 1).toString();
2907
2921
  }
2908
2922
  }
2909
2923
  if (endHdrYr - splityear[i] === 8 || splityear[i] - endHdrYr === 8) {
2910
- endHdrYr = (parseInt(endHdrYr) - 9).toString();
2911
- startHdrYr = (parseInt(endHdrYr) - 9).toString();
2924
+ endHdrYr = (parseInt(endHdrYr, 10) - 9).toString();
2925
+ startHdrYr = (parseInt(endHdrYr, 10) - 9).toString();
2912
2926
  }
2913
2927
  if (endHdrYr - splityear[i] === 7 || splityear[i] - endHdrYr === 7) {
2914
- endHdrYr = (parseInt(endHdrYr) - 8).toString();
2915
- startHdrYr = (parseInt(endHdrYr) - 9).toString();
2928
+ endHdrYr = (parseInt(endHdrYr, 10) - 8).toString();
2929
+ startHdrYr = (parseInt(endHdrYr, 10) - 9).toString();
2916
2930
  }
2917
2931
  startHdrYr = endHdrYr - startHdrYr === 10
2918
- ? (parseInt(startHdrYr) + 1).toString() : endHdrYr - startHdrYr === 11
2919
- ? (parseInt(startHdrYr) + 2).toString() : endHdrYr - startHdrYr === 12
2920
- ? (parseInt(startHdrYr) + 3).toString() : startHdrYr;
2932
+ ? (parseInt(startHdrYr, 10) + 1).toString() : endHdrYr - startHdrYr === 11
2933
+ ? (parseInt(startHdrYr, 10) + 2).toString() : endHdrYr - startHdrYr === 12
2934
+ ? (parseInt(startHdrYr, 10) + 3).toString() : startHdrYr;
2921
2935
  if (endHdrYr - startHdrYr === 8) {
2922
- startHdrYr = (parseInt(startHdrYr) - 1).toString();
2936
+ startHdrYr = (parseInt(startHdrYr, 10) - 1).toString();
2923
2937
  }
2924
2938
  }
2925
2939
  if (this.calendarInstance.nextIconClicked) {
2926
- for (var i = 0; i <= splityear.length; i++) {
2927
- if (startHdrYr - splityear[i] === 0 || splityear[i] - startHdrYr === 0) {
2928
- startHdrYr = (parseInt(startHdrYr) + 1).toString();
2940
+ for (var i_1 = 0; i_1 <= splityear.length; i_1++) {
2941
+ if (startHdrYr - splityear[i_1] === 0 || splityear[i_1] - startHdrYr === 0) {
2942
+ startHdrYr = (parseInt(startHdrYr, 10) + 1).toString();
2929
2943
  }
2930
- if (startHdrYr - splityear[i] === 2 && startHdrYr > splityear[i].trim()) {
2931
- startHdrYr = (parseInt(startHdrYr) - 1).toString();
2944
+ if (startHdrYr - splityear[i_1] === 2 && startHdrYr > splityear[i_1].trim()) {
2945
+ startHdrYr = (parseInt(startHdrYr, 10) - 1).toString();
2932
2946
  }
2933
- if (splityear[i] - startHdrYr === 1 && startHdrYr < splityear[i].trim()) {
2934
- startHdrYr = (parseInt(startHdrYr) + 2).toString();
2947
+ if (splityear[i_1] - startHdrYr === 1 && startHdrYr < splityear[i_1].trim()) {
2948
+ startHdrYr = (parseInt(startHdrYr, 10) + 2).toString();
2935
2949
  }
2936
2950
  }
2937
2951
  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();
2952
+ startHdrYr = (parseInt(this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim(), 10) + 1).toString();
2953
+ endHdrYr = (parseInt(startHdrYr, 10) + 9).toString();
2940
2954
  }
2941
- endHdrYr = endHdrYr - startHdrYr === 10 ? (parseInt(endHdrYr) - 1).toString() : endHdrYr;
2955
+ endHdrYr = endHdrYr - startHdrYr === 10 ? (parseInt(endHdrYr, 10) - 1).toString() : endHdrYr;
2942
2956
  endHdrYr = endHdrYr - startHdrYr === 7
2943
- ? (parseInt(endHdrYr) + 2).toString() : endHdrYr - startHdrYr === 8
2944
- ? (parseInt(endHdrYr) + 1).toString() : endHdrYr;
2957
+ ? (parseInt(endHdrYr, 10) + 2).toString() : endHdrYr - startHdrYr === 8
2958
+ ? (parseInt(endHdrYr, 10) + 1).toString() : endHdrYr;
2945
2959
  }
2946
2960
  this.calendarInstance.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);
2947
2961
  this.calendarInstance.nextIconClicked = this.calendarInstance.previousIconClicked = false;
2948
- var year = (parseInt(startHdrYr) - 2).toString();
2949
- startFullYr = Math.round(parseInt(startHdrYr) * 0.97 + 622);
2950
- endFullYr = Math.round(parseInt(endHdrYr) * 0.97 + 622);
2951
- var startYear = Math.round(parseInt(year) * 0.97 + 622);
2962
+ var year = (parseInt(startHdrYr, 10) - 2).toString();
2963
+ startFullYr = Math.round(parseInt(startHdrYr, 10) * 0.97 + 622);
2964
+ endFullYr = Math.round(parseInt(endHdrYr, 10) * 0.97 + 622);
2965
+ var startYear = Math.round(parseInt(year, 10) * 0.97 + 622);
2952
2966
  for (var rowCount = 1; rowCount <= yearCell; ++rowCount) {
2953
2967
  var year_1 = startYear + rowCount;
2954
2968
  localDate.setFullYear(year_1);
@@ -2962,12 +2976,14 @@ var Islamic = /** @__PURE__ @class */ (function () {
2962
2976
  islamicDate = this.getIslamicDate(localDate);
2963
2977
  var gregorianObject_2 = HijriParser.toGregorian(islamicDate.year, 1, 1);
2964
2978
  localDate = gregorianObject_2;
2965
- if (islamicDate.year === parseInt(startHdrYr) - 1 || islamicDate.year >= startHdrYr && islamicDate.year <= endFullYr || islamicDate.year === parseInt(endHdrYr) + 1) {
2979
+ if (islamicDate.year === parseInt(startHdrYr, 10) - 1 || islamicDate.year >= startHdrYr &&
2980
+ islamicDate.year <= endFullYr || islamicDate.year === parseInt(endHdrYr, 10) + 1) {
2966
2981
  var tdEle = this.islamicDayCell(localDate);
2967
2982
  attributes(tdEle, { 'role': 'gridcell' });
2968
2983
  var dayLink = this.calendarInstance.createElement('span');
2969
2984
  dayLink.textContent = this.calendarInstance.globalize.formatDate(localDate, { type: 'dateTime', format: 'y', calendar: 'islamic' });
2970
- if (islamicDate.year === parseInt(startHdrYr) - 1 || (year_1 < startFullYr) || (year_1 > endFullYr) && islamicDate.year !== parseInt(endHdrYr)) {
2985
+ if (islamicDate.year === parseInt(startHdrYr, 10) - 1 || (year_1 < startFullYr) ||
2986
+ (year_1 > endFullYr) && islamicDate.year !== parseInt(endHdrYr, 10)) {
2971
2987
  addClass([tdEle], OTHERMONTH$1);
2972
2988
  }
2973
2989
  else if (year_1 < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
@@ -2980,7 +2996,8 @@ var Islamic = /** @__PURE__ @class */ (function () {
2980
2996
  addClass([tdEle], SELECTED$1);
2981
2997
  }
2982
2998
  else {
2983
- if (localDate.getFullYear() === this.calendarInstance.currentDate.getFullYear() && !tdEle.classList.contains(DISABLED$1)) {
2999
+ if (localDate.getFullYear() === this.calendarInstance.currentDate.getFullYear() &&
3000
+ !tdEle.classList.contains(DISABLED$1)) {
2984
3001
  addClass([tdEle], FOCUSEDDATE$1);
2985
3002
  }
2986
3003
  }
@@ -3230,7 +3247,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3230
3247
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
3231
3248
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
3232
3249
  }
3233
- if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
3250
+ if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
3234
3251
  this.enabled = false;
3235
3252
  }
3236
3253
  this.renderComplete();
@@ -3278,15 +3295,15 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3278
3295
  DatePicker.prototype.initialize = function () {
3279
3296
  this.checkInvalidValue(this.value);
3280
3297
  if (this.enableMask) {
3281
- this.notify("createMask", {
3282
- module: "MaskedDateTime",
3298
+ this.notify('createMask', {
3299
+ module: 'MaskedDateTime'
3283
3300
  });
3284
3301
  }
3285
3302
  this.createInput();
3286
3303
  this.updateHtmlAttributeToWrapper();
3287
3304
  this.setAllowEdit();
3288
3305
  this.updateInput(true);
3289
- if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType == 'Always' || !this.floatLabelType || !this.placeholder)) {
3306
+ if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {
3290
3307
  this.updateInputValue(this.maskedDateValue);
3291
3308
  }
3292
3309
  this.previousElementValue = this.inputElement.value;
@@ -3400,8 +3417,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3400
3417
  }
3401
3418
  else {
3402
3419
  this.updateInputValue(this.maskedDateValue);
3403
- this.notify("createMask", {
3404
- module: "MaskedDateTime",
3420
+ this.notify('createMask', {
3421
+ module: 'MaskedDateTime'
3405
3422
  });
3406
3423
  }
3407
3424
  }
@@ -3567,8 +3584,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3567
3584
  if (e.code !== 'Delete') {
3568
3585
  e.preventDefault();
3569
3586
  }
3570
- this.notify("keyDownHandler", {
3571
- module: "MaskedDateTime",
3587
+ this.notify('keyDownHandler', {
3588
+ module: 'MaskedDateTime',
3572
3589
  e: e
3573
3590
  });
3574
3591
  }
@@ -3643,8 +3660,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3643
3660
  DatePicker.prototype.mouseUpHandler = function (e) {
3644
3661
  if (this.enableMask) {
3645
3662
  e.preventDefault();
3646
- this.notify("setMaskSelection", {
3647
- module: "MaskedDateTime"
3663
+ this.notify('setMaskSelection', {
3664
+ module: 'MaskedDateTime'
3648
3665
  });
3649
3666
  }
3650
3667
  };
@@ -3662,8 +3679,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3662
3679
  this.popupUpdate();
3663
3680
  this.changeEvent(event);
3664
3681
  if (this.enableMask) {
3665
- this.notify("clearHandler", {
3666
- module: "MaskedDateTime"
3682
+ this.notify('clearHandler', {
3683
+ module: 'MaskedDateTime'
3667
3684
  });
3668
3685
  }
3669
3686
  if (closest(this.element, 'form')) {
@@ -3798,7 +3815,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3798
3815
  return;
3799
3816
  }
3800
3817
  if (this.enableMask && !this.inputElement.value && this.placeholder) {
3801
- if (this.maskedDateValue && !this.value && (this.floatLabelType == 'Auto' || this.floatLabelType == 'Never' || this.placeholder)) {
3818
+ if (this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {
3802
3819
  this.updateInputValue(this.maskedDateValue);
3803
3820
  this.inputElement.selectionStart = 0;
3804
3821
  this.inputElement.selectionEnd = this.inputElement.value.length;
@@ -3817,8 +3834,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3817
3834
  DatePicker.prototype.inputHandler = function () {
3818
3835
  this.isPopupClicked = false;
3819
3836
  if (this.enableMask) {
3820
- this.notify("inputHandler", {
3821
- module: "MaskedDateTime"
3837
+ this.notify('inputHandler', {
3838
+ module: 'MaskedDateTime'
3822
3839
  });
3823
3840
  }
3824
3841
  };
@@ -3835,7 +3852,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3835
3852
  this.popupUpdate();
3836
3853
  this.changeTrigger(e);
3837
3854
  if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
3838
- if (this.inputElement.value == this.maskedDateValue && !this.value && (this.floatLabelType == 'Auto' || this.floatLabelType == 'Never' || this.placeholder)) {
3855
+ if (this.inputElement.value === this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {
3839
3856
  this.updateInputValue('');
3840
3857
  }
3841
3858
  }
@@ -3924,31 +3941,33 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
3924
3941
  break;
3925
3942
  case 'tab':
3926
3943
  case 'shiftTab':
3927
- var start = this.inputElement.selectionStart;
3928
- var end = this.inputElement.selectionEnd;
3929
- if (this.enableMask && !this.popupObj && !this.readonly) {
3930
- var length_1 = this.inputElement.value.length;
3931
- if ((start == 0 && end == length_1) || (end !== length_1 && e.action == 'tab') || (start !== 0 && e.action == 'shiftTab')) {
3932
- e.preventDefault();
3944
+ {
3945
+ var start = this.inputElement.selectionStart;
3946
+ var end = this.inputElement.selectionEnd;
3947
+ if (this.enableMask && !this.popupObj && !this.readonly) {
3948
+ var length_1 = this.inputElement.value.length;
3949
+ if ((start === 0 && end === length_1) || (end !== length_1 && e.action === 'tab') || (start !== 0 && e.action === 'shiftTab')) {
3950
+ e.preventDefault();
3951
+ }
3952
+ this.notify('keyDownHandler', {
3953
+ module: 'MaskedDateTime',
3954
+ e: e
3955
+ });
3956
+ start = this.inputElement.selectionStart;
3957
+ end = this.inputElement.selectionEnd;
3933
3958
  }
3934
- this.notify("keyDownHandler", {
3935
- module: "MaskedDateTime",
3936
- e: e
3937
- });
3938
- start = this.inputElement.selectionStart;
3939
- end = this.inputElement.selectionEnd;
3940
- }
3941
- this.strictModeUpdate();
3942
- this.updateInput();
3943
- this.popupUpdate();
3944
- this.changeTrigger(e);
3945
- this.errorClass();
3946
- if (this.enableMask) {
3947
- this.inputElement.selectionStart = start;
3948
- this.inputElement.selectionEnd = end;
3959
+ this.strictModeUpdate();
3960
+ this.updateInput();
3961
+ this.popupUpdate();
3962
+ this.changeTrigger(e);
3963
+ this.errorClass();
3964
+ if (this.enableMask) {
3965
+ this.inputElement.selectionStart = start;
3966
+ this.inputElement.selectionEnd = end;
3967
+ }
3968
+ this.hide(e);
3969
+ break;
3949
3970
  }
3950
- this.hide(e);
3951
- break;
3952
3971
  default:
3953
3972
  this.defaultAction(e);
3954
3973
  // Fix for close the popup when select the previously selected value.
@@ -4244,7 +4263,6 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4244
4263
  }
4245
4264
  return modules;
4246
4265
  };
4247
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4248
4266
  DatePicker.prototype.selectCalendar = function (e) {
4249
4267
  var date;
4250
4268
  var tempFormat;
@@ -4275,16 +4293,16 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4275
4293
  date = this.globalize.formatDate(this.changedArgs.value, formatOptions);
4276
4294
  }
4277
4295
  if (this.enableMask) {
4278
- this.notify("createMask", {
4279
- module: "MaskedDateTime",
4296
+ this.notify('createMask', {
4297
+ module: 'MaskedDateTime'
4280
4298
  });
4281
4299
  }
4282
4300
  }
4283
4301
  if (!isNullOrUndefined(date)) {
4284
4302
  this.updateInputValue(date);
4285
4303
  if (this.enableMask) {
4286
- this.notify("setMaskSelection", {
4287
- module: "MaskedDateTime"
4304
+ this.notify('setMaskSelection', {
4305
+ module: 'MaskedDateTime'
4288
4306
  });
4289
4307
  }
4290
4308
  }
@@ -4321,7 +4339,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4321
4339
  else {
4322
4340
  var prevent_1 = true;
4323
4341
  var outOfRange = void 0;
4324
- if (!isNullOrUndefined(this.value) && !(+this.value >= +new Date(this.checkValue(this.min)) && +this.value <= +new Date(this.checkValue(this.max)))) {
4342
+ if (!isNullOrUndefined(this.value) && !(+this.value >= +new Date(this.checkValue(this.min))
4343
+ && +this.value <= +new Date(this.checkValue(this.max)))) {
4325
4344
  outOfRange = new Date(this.checkValue(this.value));
4326
4345
  this.setProperties({ 'value': null }, true);
4327
4346
  }
@@ -4842,8 +4861,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4842
4861
  this.updateInputValue(inputVal);
4843
4862
  if (this.enableMask) {
4844
4863
  this.updateInputValue(this.maskedDateValue);
4845
- this.notify("createMask", {
4846
- module: "MaskedDateTime",
4864
+ this.notify('createMask', {
4865
+ module: 'MaskedDateTime'
4847
4866
  });
4848
4867
  }
4849
4868
  }
@@ -4867,7 +4886,10 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4867
4886
  var isDisabledDate = this.calendarElement &&
4868
4887
  this.calendarElement.querySelectorAll(dateIdString)[0] &&
4869
4888
  this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
4870
- if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) && !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
4889
+ if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&
4890
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4891
+ !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
4892
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4871
4893
  && new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
4872
4894
  || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
4873
4895
  addClass([this.inputWrapper.container], ERROR);
@@ -4908,8 +4930,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4908
4930
  this.isInteracted = true;
4909
4931
  this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;
4910
4932
  if (this.enableMask) {
4911
- this.notify("createMask", {
4912
- module: "MaskedDateTime",
4933
+ this.notify('createMask', {
4934
+ module: 'MaskedDateTime'
4913
4935
  });
4914
4936
  }
4915
4937
  break;
@@ -4918,8 +4940,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4918
4940
  this.bindInputEvent();
4919
4941
  this.updateInput();
4920
4942
  if (this.enableMask) {
4921
- this.notify("createMask", {
4922
- module: "MaskedDateTime",
4943
+ this.notify('createMask', {
4944
+ module: 'MaskedDateTime'
4923
4945
  });
4924
4946
  if (!this.value) {
4925
4947
  this.updateInputValue(this.maskedDateValue);
@@ -4951,8 +4973,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4951
4973
  Input.setPlaceholder(this.placeholder, this.inputElement);
4952
4974
  this.updateInput();
4953
4975
  if (this.enableMask) {
4954
- this.notify("createMask", {
4955
- module: "MaskedDateTime",
4976
+ this.notify('createMask', {
4977
+ module: 'MaskedDateTime'
4956
4978
  });
4957
4979
  }
4958
4980
  break;
@@ -4998,8 +5020,8 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
4998
5020
  break;
4999
5021
  case 'enableMask':
5000
5022
  if (this.enableMask) {
5001
- this.notify("createMask", {
5002
- module: "MaskedDateTime",
5023
+ this.notify('createMask', {
5024
+ module: 'MaskedDateTime'
5003
5025
  });
5004
5026
  this.updateInputValue(this.maskedDateValue);
5005
5027
  this.bindInputEvent();
@@ -5277,7 +5299,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5277
5299
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
5278
5300
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
5279
5301
  }
5280
- if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
5302
+ if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
5281
5303
  this.enabled = false;
5282
5304
  }
5283
5305
  this.renderComplete();
@@ -5479,7 +5501,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5479
5501
  var attributes$$1 = {};
5480
5502
  if (!isDynamic) {
5481
5503
  for (var i = 0; i < this.element.attributes.length; i++) {
5482
- attributes$$1[this.element.attributes[i].name] = this.element.getAttribute(this.element.attributes[i].name);
5504
+ attributes$$1[this.element.attributes[i].name] =
5505
+ this.element.getAttribute(this.element.attributes[i].name);
5483
5506
  }
5484
5507
  }
5485
5508
  else {
@@ -5912,7 +5935,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
5912
5935
  this.createControl();
5913
5936
  this.bindCalendarEvents();
5914
5937
  this.updateRange((this.isMobile ? [this.calendarElement] : [this.leftCalendar, this.rightCalendar]));
5915
- if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
5938
+ if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) &&
5939
+ !isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
5916
5940
  this.disabledDateRender();
5917
5941
  }
5918
5942
  this.updateHeader();
@@ -6158,6 +6182,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6158
6182
  }
6159
6183
  this.updateHiddenInput();
6160
6184
  };
6185
+ // eslint-disable-next-line @typescript-eslint/tslint/config
6161
6186
  DateRangePicker.prototype.getStartEndDate = function (date, isEnd, range, dateOptions) {
6162
6187
  if (this.depth === 'Month') {
6163
6188
  return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
@@ -6547,7 +6572,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
6547
6572
  var isLeftYear = leftHeader ? leftHeader.classList.contains('e-year') : false;
6548
6573
  var isRightDecade = rightHeader ? rightHeader.classList.contains('e-decade') : false;
6549
6574
  var isLeftDecade = leftHeader ? leftHeader.classList.contains('e-decade') : false;
6550
- return isLeftCalendar && (isLeftMonth || isLeftYear || isLeftDecade) && (isRightMonth || isRightYear || isRightDecade) && !this.isMobile;
6575
+ return isLeftCalendar && (isLeftMonth || isLeftYear || isLeftDecade) &&
6576
+ (isRightMonth || isRightYear || isRightDecade) && !this.isMobile;
6551
6577
  };
6552
6578
  DateRangePicker.prototype.keyNavigation = function (calendar, e) {
6553
6579
  this.bindCalendarCellEvents(calendar);
@@ -8507,7 +8533,8 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
8507
8533
  if (!this.strictMode && (isDisabled)) {
8508
8534
  this.clearRange();
8509
8535
  }
8510
- if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isDisabled && !isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
8536
+ if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) &&
8537
+ !isDisabled && !isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
8511
8538
  this.disabledDateRender();
8512
8539
  }
8513
8540
  this.errorClass();
@@ -9254,6 +9281,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
9254
9281
  this.updateHeader();
9255
9282
  }
9256
9283
  };
9284
+ // eslint-disable-next-line @typescript-eslint/tslint/config
9257
9285
  DateRangePicker.prototype.getStartEndValue = function (date, isEnd) {
9258
9286
  if (this.depth === 'Month') {
9259
9287
  return this.checkDateValue(new Date(this.checkValue(date)));
@@ -9809,7 +9837,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
9809
9837
  this.bindEvents();
9810
9838
  this.validateDisable();
9811
9839
  this.setValue(this.getFormattedValue(this.value));
9812
- if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType == 'Always' || !this.floatLabelType || !this.placeholder)) {
9840
+ if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {
9813
9841
  this.updateInputValue(this.maskedDateValue);
9814
9842
  this.checkErrorState(this.maskedDateValue);
9815
9843
  }
@@ -9819,7 +9847,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
9819
9847
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
9820
9848
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
9821
9849
  }
9822
- if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
9850
+ if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
9823
9851
  this.enabled = false;
9824
9852
  }
9825
9853
  this.renderComplete();
@@ -9920,8 +9948,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
9920
9948
  attributes(this.inputElement, { 'name': this.element.id });
9921
9949
  }
9922
9950
  if (this.enableMask) {
9923
- this.notify("createMask", {
9924
- module: "MaskedDateTime",
9951
+ this.notify('createMask', {
9952
+ module: 'MaskedDateTime'
9925
9953
  });
9926
9954
  }
9927
9955
  };
@@ -10270,7 +10298,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10270
10298
  };
10271
10299
  TimePicker.prototype.checkErrorState = function (val) {
10272
10300
  var value = this.getDateObject(val);
10273
- if ((this.validateState(value) && !this.invalidValueString) || (this.enableMask && this.inputElement.value === this.maskedDateValue)) {
10301
+ if ((this.validateState(value) && !this.invalidValueString) ||
10302
+ (this.enableMask && this.inputElement.value === this.maskedDateValue)) {
10274
10303
  this.removeErrorClass();
10275
10304
  }
10276
10305
  else {
@@ -10518,8 +10547,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10518
10547
  event.preventDefault();
10519
10548
  if (this.enableMask) {
10520
10549
  event.preventDefault();
10521
- this.notify("setMaskSelection", {
10522
- module: "MaskedDateTime"
10550
+ this.notify('setMaskSelection', {
10551
+ module: 'MaskedDateTime'
10523
10552
  });
10524
10553
  return;
10525
10554
  }
@@ -10582,8 +10611,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10582
10611
  case 'down':
10583
10612
  if (this.enableMask && !this.readonly && !this.isPopupOpen()) {
10584
10613
  event.preventDefault();
10585
- this.notify("keyDownHandler", {
10586
- module: "MaskedDateTime",
10614
+ this.notify('keyDownHandler', {
10615
+ module: 'MaskedDateTime',
10587
10616
  e: event
10588
10617
  });
10589
10618
  }
@@ -10628,12 +10657,12 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10628
10657
  case 'tab':
10629
10658
  case 'shiftTab':
10630
10659
  if (!this.isPopupOpen() && this.enableMask && !this.readonly) {
10631
- if ((this.inputElement.selectionStart == 0 && this.inputElement.selectionEnd == this.inputElement.value.length) ||
10632
- (this.inputElement.selectionEnd !== this.inputElement.value.length && event.action == 'tab') ||
10633
- (this.inputElement.selectionStart !== 0 && event.action == 'shiftTab') || (event.action == 'left' || event.action == 'right')) {
10660
+ if ((this.inputElement.selectionStart === 0 && this.inputElement.selectionEnd === this.inputElement.value.length) ||
10661
+ (this.inputElement.selectionEnd !== this.inputElement.value.length && event.action === 'tab') ||
10662
+ (this.inputElement.selectionStart !== 0 && event.action === 'shiftTab') || (event.action === 'left' || event.action === 'right')) {
10634
10663
  event.preventDefault();
10635
10664
  }
10636
- this.notify("keyDownHandler", { module: "MaskedDateTime",
10665
+ this.notify('keyDownHandler', { module: 'MaskedDateTime',
10637
10666
  e: event
10638
10667
  });
10639
10668
  }
@@ -10750,8 +10779,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10750
10779
  if (this.isValidLI(li)) {
10751
10780
  this.checkValue(li.getAttribute('data-value'));
10752
10781
  if (this.enableMask) {
10753
- this.notify("setMaskSelection", {
10754
- module: "MaskedDateTime"
10782
+ this.notify('createMask', {
10783
+ module: 'MaskedDateTime', navigated: true
10755
10784
  });
10756
10785
  }
10757
10786
  this.selectedElement = li;
@@ -10897,8 +10926,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10897
10926
  switch (e.code) {
10898
10927
  case 'Delete':
10899
10928
  if (this.enableMask && !this.popupObj && !this.readonly) {
10900
- this.notify("keyDownHandler", {
10901
- module: "MaskedDateTime",
10929
+ this.notify('keyDownHandler', {
10930
+ module: 'MaskedDateTime',
10902
10931
  e: e
10903
10932
  });
10904
10933
  }
@@ -10944,8 +10973,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10944
10973
  };
10945
10974
  TimePicker.prototype.inputEventHandler = function () {
10946
10975
  if (this.enableMask) {
10947
- this.notify("inputHandler", {
10948
- module: "MaskedDateTime"
10976
+ this.notify('inputHandler', {
10977
+ module: 'MaskedDateTime'
10949
10978
  });
10950
10979
  }
10951
10980
  };
@@ -10995,8 +11024,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
10995
11024
  this.popupWrapper.scrollTop = 0;
10996
11025
  }
10997
11026
  if (this.enableMask) {
10998
- this.notify("clearHandler", {
10999
- module: "MaskedDateTime"
11027
+ this.notify('clearHandler', {
11028
+ module: 'MaskedDateTime'
11000
11029
  });
11001
11030
  }
11002
11031
  if (closest(this.element, 'form')) {
@@ -11123,10 +11152,10 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11123
11152
  if (!inputVal) {
11124
11153
  this.updateInputValue(this.maskedDateValue);
11125
11154
  }
11126
- if (isNullOrUndefined(val) && value != this.maskedDateValue) {
11155
+ if (isNullOrUndefined(val) && value !== this.maskedDateValue) {
11127
11156
  this.createMask();
11128
11157
  }
11129
- if (isNullOrUndefined(val) && value == this.maskedDateValue) {
11158
+ if (isNullOrUndefined(val) && value === this.maskedDateValue) {
11130
11159
  this.updateInputValue(this.maskedDateValue);
11131
11160
  }
11132
11161
  }
@@ -11198,13 +11227,13 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11198
11227
  else {
11199
11228
  this.updateInputValue(time);
11200
11229
  if (this.enableMask) {
11201
- if (time == '') {
11230
+ if (time === '') {
11202
11231
  this.updateInputValue(this.maskedDateValue);
11203
11232
  }
11204
- if (isNullOrUndefined(time) && value != this.maskedDateValue) {
11233
+ if (isNullOrUndefined(time) && value !== this.maskedDateValue) {
11205
11234
  this.createMask();
11206
11235
  }
11207
- if (isNullOrUndefined(time) && value == this.maskedDateValue) {
11236
+ if (isNullOrUndefined(time) && value === this.maskedDateValue) {
11208
11237
  this.updateInputValue(this.maskedDateValue);
11209
11238
  }
11210
11239
  }
@@ -11212,8 +11241,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11212
11241
  return time;
11213
11242
  };
11214
11243
  TimePicker.prototype.createMask = function () {
11215
- this.notify("createMask", {
11216
- module: "MaskedDateTime",
11244
+ this.notify('createMask', {
11245
+ module: 'MaskedDateTime'
11217
11246
  });
11218
11247
  };
11219
11248
  TimePicker.prototype.findNextElement = function (event) {
@@ -11324,7 +11353,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11324
11353
  return elementIndex;
11325
11354
  };
11326
11355
  TimePicker.prototype.keyHandler = function (event) {
11327
- if (isNullOrUndefined(this.step) || this.step <= 0 || !isNullOrUndefined(this.inputWrapper) && this.inputWrapper.buttons[0].classList.contains(DISABLED$3)) {
11356
+ if (isNullOrUndefined(this.step) || this.step <= 0 || !isNullOrUndefined(this.inputWrapper)
11357
+ && this.inputWrapper.buttons[0].classList.contains(DISABLED$3)) {
11328
11358
  return;
11329
11359
  }
11330
11360
  var count = this.timeCollections.length;
@@ -11352,7 +11382,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11352
11382
  this.activeIndex = index = this.activeIndex < 0 ? (count - 1) : this.activeIndex;
11353
11383
  this.activeIndex = index = this.validLiElement(this.activeIndex, (event.keyCode === 40 || event.keyCode === 39) ?
11354
11384
  false : true);
11355
- nextItem = isNullOrUndefined(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
11385
+ nextItem = isNullOrUndefined(this.timeCollections[index]) ?
11386
+ this.timeCollections[0] : this.timeCollections[index];
11356
11387
  }
11357
11388
  else if (event.action === 'home') {
11358
11389
  var index = this.validLiElement(0);
@@ -11641,7 +11672,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11641
11672
  }
11642
11673
  this.closePopup(0, e);
11643
11674
  if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {
11644
- if (this.inputElement.value == this.maskedDateValue && !this.value && (this.floatLabelType == 'Auto' || this.floatLabelType == 'Never' || this.placeholder)) {
11675
+ if (this.inputElement.value === this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {
11645
11676
  this.updateInputValue('');
11646
11677
  }
11647
11678
  }
@@ -11694,7 +11725,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11694
11725
  this.selectInputText();
11695
11726
  }
11696
11727
  if (this.enableMask && !this.inputElement.value && this.placeholder) {
11697
- if (this.maskedDateValue && !this.value && (this.floatLabelType == 'Auto' || this.floatLabelType == 'Never' || this.placeholder)) {
11728
+ if (this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {
11698
11729
  this.updateInputValue(this.maskedDateValue);
11699
11730
  this.inputElement.selectionStart = 0;
11700
11731
  this.inputElement.selectionEnd = this.inputElement.value.length;
@@ -11940,8 +11971,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11940
11971
  this.updatePlaceHolder();
11941
11972
  this.setValue(this.value);
11942
11973
  if (this.enableMask) {
11943
- this.notify("createMask", {
11944
- module: "MaskedDateTime",
11974
+ this.notify('createMask', {
11975
+ module: 'MaskedDateTime'
11945
11976
  });
11946
11977
  }
11947
11978
  break;
@@ -11993,8 +12024,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
11993
12024
  this.preventChange = false;
11994
12025
  }
11995
12026
  if (this.enableMask) {
11996
- this.notify("createMask", {
11997
- module: "MaskedDateTime",
12027
+ this.notify('createMask', {
12028
+ module: 'MaskedDateTime'
11998
12029
  });
11999
12030
  }
12000
12031
  break;
@@ -12028,8 +12059,8 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
12028
12059
  break;
12029
12060
  case 'enableMask':
12030
12061
  if (this.enableMask) {
12031
- this.notify("createMask", {
12032
- module: "MaskedDateTime",
12062
+ this.notify('createMask', {
12063
+ module: 'MaskedDateTime'
12033
12064
  });
12034
12065
  this.updateInputValue(this.maskedDateValue);
12035
12066
  }
@@ -12346,7 +12377,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12346
12377
  this.cloneElement = this.element.cloneNode(true);
12347
12378
  this.dateTimeFormat = this.cldrDateTimeFormat();
12348
12379
  this.initValue = this.value;
12349
- if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
12380
+ if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {
12350
12381
  this.enabled = false;
12351
12382
  }
12352
12383
  _super.prototype.updateHtmlAttributeToElement.call(this);
@@ -12359,12 +12390,12 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12359
12390
  _super.prototype.updateHtmlAttributeToWrapper.call(this);
12360
12391
  this.bindInputEvents();
12361
12392
  if (this.enableMask) {
12362
- this.notify("createMask", {
12363
- module: "MaskedDateTime",
12393
+ this.notify('createMask', {
12394
+ module: 'MaskedDateTime'
12364
12395
  });
12365
12396
  }
12366
12397
  this.setValue(true);
12367
- if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType == 'Always' || !this.floatLabelType || !this.placeholder)) {
12398
+ if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {
12368
12399
  Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
12369
12400
  }
12370
12401
  this.setProperties({ scrollTo: this.checkDateValue(new Date(this.checkValue(this.scrollTo))) }, true);
@@ -12539,7 +12570,6 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12539
12570
  }
12540
12571
  return cldrTime;
12541
12572
  };
12542
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
12543
12573
  DateTimePicker.prototype.getCldrFormat = function (type) {
12544
12574
  var cldrDateTime;
12545
12575
  if (this.locale === 'en' || this.locale === 'en-US') {
@@ -12558,7 +12588,6 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12558
12588
  return false;
12559
12589
  }
12560
12590
  };
12561
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
12562
12591
  DateTimePicker.prototype.getCultureTimeObject = function (ld, c) {
12563
12592
  if (this.calendarMode === 'Gregorian') {
12564
12593
  return getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.timeFormats.short', ld);
@@ -12656,8 +12685,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12656
12685
  });
12657
12686
  }
12658
12687
  var value = isNullOrUndefined(this.value) ? this.inputElement.value !== '' ?
12659
- dateObject :
12660
- new Date() : this.value;
12688
+ dateObject : new Date() : this.value;
12661
12689
  this.valueWithMinutes = value;
12662
12690
  this.listWrapper = createElement('div', { className: CONTENT$3, attrs: { 'tabindex': '0' } });
12663
12691
  var min = this.startTime(value);
@@ -12952,8 +12980,8 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
12952
12980
  return this.validateMinMaxRange(value);
12953
12981
  };
12954
12982
  DateTimePicker.prototype.createMask = function () {
12955
- this.notify("createMask", {
12956
- module: "MaskedDateTime",
12983
+ this.notify('createMask', {
12984
+ module: 'MaskedDateTime'
12957
12985
  });
12958
12986
  };
12959
12987
  DateTimePicker.prototype.combineDateTime = function (value) {
@@ -13407,7 +13435,8 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13407
13435
  var index = (event.keyCode === 40 || event.keyCode === 39) ? ++this.activeIndex : --this.activeIndex;
13408
13436
  this.activeIndex = index = this.activeIndex === (listCount) ? 0 : this.activeIndex;
13409
13437
  this.activeIndex = index = this.activeIndex < 0 ? (listCount - 1) : this.activeIndex;
13410
- nextItemValue = isNullOrUndefined(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
13438
+ nextItemValue = isNullOrUndefined(this.timeCollections[index]) ?
13439
+ this.timeCollections[0] : this.timeCollections[index];
13411
13440
  }
13412
13441
  else if (event.action === 'home') {
13413
13442
  this.activeIndex = 0;
@@ -13505,8 +13534,8 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13505
13534
  this.changeTrigger(null);
13506
13535
  this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;
13507
13536
  if (this.enableMask && this.value) {
13508
- this.notify("createMask", {
13509
- module: "MaskedDateTime",
13537
+ this.notify('createMask', {
13538
+ module: 'MaskedDateTime'
13510
13539
  });
13511
13540
  }
13512
13541
  break;
@@ -13549,8 +13578,8 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13549
13578
  this.dateTimeFormat = this.formatString;
13550
13579
  this.setValue();
13551
13580
  if (this.enableMask) {
13552
- this.notify("createMask", {
13553
- module: "MaskedDateTime",
13581
+ this.notify('createMask', {
13582
+ module: 'MaskedDateTime'
13554
13583
  });
13555
13584
  if (!this.value) {
13556
13585
  Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
@@ -13601,8 +13630,8 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
13601
13630
  break;
13602
13631
  case 'enableMask':
13603
13632
  if (this.enableMask) {
13604
- this.notify("createMask", {
13605
- module: "MaskedDateTime",
13633
+ this.notify('createMask', {
13634
+ module: 'MaskedDateTime'
13606
13635
  });
13607
13636
  Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
13608
13637
  }
@@ -13770,7 +13799,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13770
13799
  hour: 'hour',
13771
13800
  minute: 'minute',
13772
13801
  second: 'second',
13773
- dayOfTheWeek: 'day of the week',
13802
+ dayOfTheWeek: 'day of the week'
13774
13803
  };
13775
13804
  this.hiddenMask = '';
13776
13805
  this.validCharacters = 'dMyhmHfasz';
@@ -13833,23 +13862,31 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13833
13862
  this.parent.off('keyDownHandler', this.maskKeydownHandler);
13834
13863
  this.parent.off('clearHandler', this.clearHandler);
13835
13864
  };
13836
- MaskedDateTime.prototype.createMask = function (dateformat) {
13865
+ MaskedDateTime.prototype.createMask = function (navigated) {
13866
+ if (navigated === void 0) { navigated = false; }
13837
13867
  this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;
13838
13868
  this.dateformat = this.getCulturedFormat();
13839
- if (this.parent.maskPlaceholder.day)
13869
+ if (this.parent.maskPlaceholder.day) {
13840
13870
  this.defaultConstant['day'] = this.parent.maskPlaceholder.day;
13841
- if (this.parent.maskPlaceholder.month)
13871
+ }
13872
+ if (this.parent.maskPlaceholder.month) {
13842
13873
  this.defaultConstant['month'] = this.parent.maskPlaceholder.month;
13843
- if (this.parent.maskPlaceholder.year)
13874
+ }
13875
+ if (this.parent.maskPlaceholder.year) {
13844
13876
  this.defaultConstant['year'] = this.parent.maskPlaceholder.year;
13845
- if (this.parent.maskPlaceholder.hour)
13877
+ }
13878
+ if (this.parent.maskPlaceholder.hour) {
13846
13879
  this.defaultConstant['hour'] = this.parent.maskPlaceholder.hour;
13847
- if (this.parent.maskPlaceholder.minute)
13880
+ }
13881
+ if (this.parent.maskPlaceholder.minute) {
13848
13882
  this.defaultConstant['minute'] = this.parent.maskPlaceholder.minute;
13849
- if (this.parent.maskPlaceholder.second)
13883
+ }
13884
+ if (this.parent.maskPlaceholder.second) {
13850
13885
  this.defaultConstant['second'] = this.parent.maskPlaceholder.second;
13851
- if (this.parent.maskPlaceholder.dayOfTheWeek)
13886
+ }
13887
+ if (this.parent.maskPlaceholder.dayOfTheWeek) {
13852
13888
  this.defaultConstant['dayOfTheWeek'] = this.parent.maskPlaceholder.dayOfTheWeek.toString();
13889
+ }
13853
13890
  this.getCUltureMaskFormat();
13854
13891
  var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
13855
13892
  this.isHiddenMask = true;
@@ -13859,6 +13896,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13859
13896
  this.mask = this.previousValue = inputValue;
13860
13897
  this.parent.maskedDateValue = this.mask;
13861
13898
  if (this.parent.value) {
13899
+ this.navigated = navigated;
13862
13900
  this.setDynamicValue();
13863
13901
  }
13864
13902
  };
@@ -13866,7 +13904,8 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13866
13904
  this.l10n = new L10n(this.parent.moduleName, this.defaultConstant, this.parent.locale);
13867
13905
  this.objectString = Object.keys(this.defaultConstant);
13868
13906
  for (var i = 0; i < this.objectString.length; i++) {
13869
- this.defaultConstant[this.objectString[i].toString()] = this.l10n.getConstant(this.objectString[i].toString());
13907
+ this.defaultConstant[this.objectString[i].toString()] =
13908
+ this.l10n.getConstant(this.objectString[i].toString());
13870
13909
  }
13871
13910
  };
13872
13911
  MaskedDateTime.prototype.validCharacterCheck = function () {
@@ -13886,8 +13925,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13886
13925
  this.maskDateValue = new Date(+this.parent.value);
13887
13926
  this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;
13888
13927
  this.updateValue();
13889
- // this.parent.inputElement.selectionStart = start;
13890
- // this.validCharacterCheck();
13928
+ this.validCharacterCheck();
13891
13929
  };
13892
13930
  MaskedDateTime.prototype.setSelection = function (validChar) {
13893
13931
  var start = -1;
@@ -13911,12 +13949,13 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13911
13949
  this.isDeleteKey = true;
13912
13950
  return;
13913
13951
  }
13914
- if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWLEFT || args.e.key === ARROWRIGHT || args.e.key === SHIFTTAB || args.e.key === TAB || args.e.action === SHIFTTAB ||
13952
+ if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWLEFT || args.e.key === ARROWRIGHT
13953
+ || args.e.key === SHIFTTAB || args.e.key === TAB || args.e.action === SHIFTTAB ||
13915
13954
  args.e.key === END || args.e.key === HOME)) {
13916
13955
  var start = this.parent.inputElement.selectionStart;
13917
13956
  var end = this.parent.inputElement.selectionEnd;
13918
13957
  var length_1 = this.parent.inputElement.value.length;
13919
- if ((start == 0 && end == length_1) && (args.e.key === TAB || args.e.action === SHIFTTAB)) {
13958
+ if ((start === 0 && end === length_1) && (args.e.key === TAB || args.e.action === SHIFTTAB)) {
13920
13959
  var index = args.e.action === SHIFTTAB ? end : 0;
13921
13960
  this.parent.inputElement.selectionStart = this.parent.inputElement.selectionEnd = index;
13922
13961
  }
@@ -13961,7 +14000,8 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13961
14000
  var newVal = inputValue.substring(0, start);
13962
14001
  var newDateValue = new Date(+this.maskDateValue);
13963
14002
  var maxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();
13964
- if (previousVal.indexOf(newVal) === 0 && (newVal.length === 0 || this.previousHiddenMask[newVal.length - 1] !== this.previousHiddenMask[newVal.length])) {
14003
+ if (previousVal.indexOf(newVal) === 0 && (newVal.length === 0 ||
14004
+ this.previousHiddenMask[newVal.length - 1] !== this.previousHiddenMask[newVal.length])) {
13965
14005
  for (var i = newVal.length; i < previousVal.length; i++) {
13966
14006
  if (this.previousHiddenMask[i] !== '' && this.validCharacters.indexOf(this.previousHiddenMask[i]) >= 0) {
13967
14007
  this.isDeletion = this.handleDeletion(this.previousHiddenMask[i], false);
@@ -13973,114 +14013,123 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
13973
14013
  }
13974
14014
  switch (this.previousHiddenMask[start - 1]) {
13975
14015
  case 'd':
13976
- var date = (this.isDayPart && newDateValue.getDate().toString().length < 2 && !this.isPersist() ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);
13977
- this.isDateZero = (newVal[start - 1] == '0');
13978
- this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
13979
- this.navigated = this.navigated ? false : this.navigated;
13980
- if (isNaN(date)) {
13981
- return;
13982
- }
13983
- for (var i = 0; date > maxDate; i++) {
13984
- date = parseInt(date.toString().slice(1), 10);
13985
- }
13986
- if (date >= 1) {
13987
- newDateValue.setDate(date);
13988
- this.isNavigate = date.toString().length === 2;
13989
- this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
13990
- if (newDateValue.getMonth() !== this.maskDateValue.getMonth()) {
14016
+ {
14017
+ var date = (this.isDayPart && newDateValue.getDate().toString().length < 2 &&
14018
+ !this.isPersist() ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);
14019
+ this.isDateZero = (newVal[start - 1] === '0');
14020
+ this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14021
+ this.navigated = this.navigated ? false : this.navigated;
14022
+ if (isNaN(date)) {
13991
14023
  return;
13992
14024
  }
13993
- this.isDayPart = true;
13994
- this.dayTypeCount = this.dayTypeCount + 1;
13995
- }
13996
- else {
13997
- this.isDayPart = false;
13998
- this.dayTypeCount = this.isDateZero ? this.dayTypeCount + 1 : this.dayTypeCount;
14025
+ for (var i = 0; date > maxDate; i++) {
14026
+ date = parseInt(date.toString().slice(1), 10);
14027
+ }
14028
+ if (date >= 1) {
14029
+ newDateValue.setDate(date);
14030
+ this.isNavigate = date.toString().length === 2;
14031
+ this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14032
+ if (newDateValue.getMonth() !== this.maskDateValue.getMonth()) {
14033
+ return;
14034
+ }
14035
+ this.isDayPart = true;
14036
+ this.dayTypeCount = this.dayTypeCount + 1;
14037
+ }
14038
+ else {
14039
+ this.isDayPart = false;
14040
+ this.dayTypeCount = this.isDateZero ? this.dayTypeCount + 1 : this.dayTypeCount;
14041
+ }
14042
+ break;
13999
14043
  }
14000
- break;
14001
14044
  case 'M':
14002
- var month = void 0;
14003
- if (newDateValue.getMonth().toString().length < 2 && !this.isPersist()) {
14004
- month = (this.isMonthPart ? (newDateValue.getMonth() + 1) * 10 : 0) + parseInt(newVal[start - 1], 10);
14005
- }
14006
- else {
14007
- month = parseInt(newVal[start - 1], 10);
14008
- }
14009
- this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14010
- this.navigated = this.navigated ? false : this.navigated;
14011
- this.isMonthZero = (newVal[start - 1] == '0');
14012
- if (!isNaN(month)) {
14013
- while (month > 12) {
14014
- month = parseInt(month.toString().slice(1), 10);
14015
- }
14016
- if (month >= 1) {
14017
- newDateValue.setMonth(month - 1);
14018
- this.isNavigate = month.toString().length === 2;
14019
- if (newDateValue.getMonth() !== month - 1) {
14020
- newDateValue.setDate(1);
14021
- newDateValue.setMonth(month - 1);
14045
+ {
14046
+ var month = void 0;
14047
+ if (newDateValue.getMonth().toString().length < 2 && !this.isPersist()) {
14048
+ month = (this.isMonthPart ? (newDateValue.getMonth() + 1) * 10 : 0) + parseInt(newVal[start - 1], 10);
14049
+ }
14050
+ else {
14051
+ month = parseInt(newVal[start - 1], 10);
14052
+ }
14053
+ this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14054
+ this.navigated = this.navigated ? false : this.navigated;
14055
+ this.isMonthZero = (newVal[start - 1] === '0');
14056
+ if (!isNaN(month)) {
14057
+ while (month > 12) {
14058
+ month = parseInt(month.toString().slice(1), 10);
14022
14059
  }
14023
- if (this.isDayPart) {
14024
- var previousMaxDate = new Date(this.previousDate.getFullYear(), this.previousDate.getMonth() + 1, 0).getDate();
14025
- var currentMaxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();
14026
- if (this.previousDate.getDate() == previousMaxDate && currentMaxDate <= previousMaxDate) {
14027
- newDateValue.setDate(currentMaxDate);
14060
+ if (month >= 1) {
14061
+ newDateValue.setMonth(month - 1);
14062
+ this.isNavigate = month.toString().length === 2;
14063
+ if (newDateValue.getMonth() !== month - 1) {
14064
+ newDateValue.setDate(1);
14065
+ newDateValue.setMonth(month - 1);
14028
14066
  }
14067
+ if (this.isDayPart) {
14068
+ var previousMaxDate = new Date(this.previousDate.getFullYear(), this.previousDate.getMonth() + 1, 0).getDate();
14069
+ var currentMaxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();
14070
+ if (this.previousDate.getDate() === previousMaxDate && currentMaxDate <= previousMaxDate) {
14071
+ newDateValue.setDate(currentMaxDate);
14072
+ }
14073
+ }
14074
+ this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14075
+ this.isMonthPart = true;
14076
+ this.monthTypeCount = this.monthTypeCount + 1;
14077
+ }
14078
+ else {
14079
+ newDateValue.setMonth(0);
14080
+ this.isMonthPart = false;
14081
+ this.monthTypeCount = this.isMonthZero ? this.monthTypeCount + 1 : this.monthTypeCount;
14029
14082
  }
14030
- this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14031
- this.isMonthPart = true;
14032
- this.monthTypeCount = this.monthTypeCount + 1;
14033
14083
  }
14034
14084
  else {
14035
- newDateValue.setMonth(0);
14036
- this.isMonthPart = false;
14037
- this.monthTypeCount = this.isMonthZero ? this.monthTypeCount + 1 : this.monthTypeCount;
14038
- }
14039
- }
14040
- else { // let monthString: string[] = <string[]>(getValue('months[stand-alone].wide', getDefaultDateObject()));
14041
- var monthString = (this.getCulturedValue('months[stand-alone].wide'));
14042
- var monthValue = Object.keys(monthString);
14043
- this.monthCharacter += newVal[start - 1].toLowerCase();
14044
- while (this.monthCharacter.length > 0) {
14045
- var i = 1;
14046
- for (var _i = 0, monthValue_1 = monthValue; _i < monthValue_1.length; _i++) {
14047
- var months = monthValue_1[_i];
14048
- if (monthString[i].toLowerCase().indexOf(this.monthCharacter) === 0) {
14049
- newDateValue.setMonth(i - 1);
14050
- this.isMonthPart = true;
14051
- this.maskDateValue = newDateValue;
14052
- return;
14085
+ var monthString = (this.getCulturedValue('months[stand-alone].wide'));
14086
+ var monthValue = Object.keys(monthString);
14087
+ this.monthCharacter += newVal[start - 1].toLowerCase();
14088
+ while (this.monthCharacter.length > 0) {
14089
+ var i = 1;
14090
+ for (var _i = 0, monthValue_1 = monthValue; _i < monthValue_1.length; _i++) {
14091
+ var months = monthValue_1[_i];
14092
+ if (monthString[i].toLowerCase().indexOf(this.monthCharacter) === 0) {
14093
+ newDateValue.setMonth(i - 1);
14094
+ this.isMonthPart = true;
14095
+ this.maskDateValue = newDateValue;
14096
+ return;
14097
+ }
14098
+ i++;
14053
14099
  }
14054
- i++;
14100
+ this.monthCharacter = this.monthCharacter.substring(1, this.monthCharacter.length);
14055
14101
  }
14056
- this.monthCharacter = this.monthCharacter.substring(1, this.monthCharacter.length);
14057
14102
  }
14103
+ break;
14058
14104
  }
14059
- break;
14060
14105
  case 'y':
14061
- var year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4 && !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
14062
- this.isShortYear = false;
14063
- this.isYearZero = (newVal[start - 1] == '0');
14064
- if (isNaN(year)) {
14065
- return;
14066
- }
14067
- while (year > 9999) {
14068
- year = parseInt(year.toString().slice(1), 10);
14069
- }
14070
- if (year < 1) {
14071
- this.isYearPart = false;
14072
- }
14073
- else {
14074
- newDateValue.setFullYear(year);
14075
- if (year.toString().length === 4) {
14076
- this.isNavigate = true;
14106
+ {
14107
+ var year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
14108
+ && !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
14109
+ this.isShortYear = false;
14110
+ this.isYearZero = (newVal[start - 1] === '0');
14111
+ if (isNaN(year)) {
14112
+ return;
14077
14113
  }
14078
- this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14079
- this.isYearPart = true;
14114
+ while (year > 9999) {
14115
+ year = parseInt(year.toString().slice(1), 10);
14116
+ }
14117
+ if (year < 1) {
14118
+ this.isYearPart = false;
14119
+ }
14120
+ else {
14121
+ newDateValue.setFullYear(year);
14122
+ if (year.toString().length === 4) {
14123
+ this.isNavigate = true;
14124
+ }
14125
+ this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14126
+ this.isYearPart = true;
14127
+ }
14128
+ break;
14080
14129
  }
14081
- break;
14082
14130
  case 'h':
14083
- this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2 && !this.isPersist() ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);
14131
+ this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2
14132
+ && !this.isPersist() ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);
14084
14133
  this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14085
14134
  this.navigated = this.navigated ? false : this.navigated;
14086
14135
  if (isNaN(this.hour)) {
@@ -14095,7 +14144,8 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14095
14144
  this.hourTypeCount = this.hourTypeCount + 1;
14096
14145
  break;
14097
14146
  case 'H':
14098
- this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 && !this.isPersist() ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
14147
+ this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 &&
14148
+ !this.isPersist() ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);
14099
14149
  this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14100
14150
  this.navigated = this.navigated ? false : this.navigated;
14101
14151
  if (isNaN(this.hour)) {
@@ -14110,67 +14160,81 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14110
14160
  this.hourTypeCount = this.hourTypeCount + 1;
14111
14161
  break;
14112
14162
  case 'm':
14113
- var minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2 && !this.isPersist() ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
14114
- this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14115
- this.navigated = this.navigated ? false : this.navigated;
14116
- if (isNaN(minutes)) {
14117
- return;
14118
- }
14119
- for (var i = 0; minutes > 59; i++) {
14120
- minutes = parseInt(minutes.toString().slice(1), 10);
14163
+ {
14164
+ var minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2
14165
+ && !this.isPersist() ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);
14166
+ this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14167
+ this.navigated = this.navigated ? false : this.navigated;
14168
+ if (isNaN(minutes)) {
14169
+ return;
14170
+ }
14171
+ for (var i = 0; minutes > 59; i++) {
14172
+ minutes = parseInt(minutes.toString().slice(1), 10);
14173
+ }
14174
+ newDateValue.setMinutes(minutes);
14175
+ this.isNavigate = minutes.toString().length === 2;
14176
+ this.isMinutePart = true;
14177
+ this.minuteTypeCount = this.minuteTypeCount + 1;
14178
+ break;
14121
14179
  }
14122
- newDateValue.setMinutes(minutes);
14123
- this.isNavigate = minutes.toString().length === 2;
14124
- this.isMinutePart = true;
14125
- this.minuteTypeCount = this.minuteTypeCount + 1;
14126
- break;
14127
14180
  case 's':
14128
- var seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 && !this.isPersist() ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
14129
- this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14130
- this.navigated = this.navigated ? false : this.navigated;
14131
- if (isNaN(seconds)) {
14132
- return;
14133
- }
14134
- for (var i = 0; seconds > 59; i++) {
14135
- seconds = parseInt(seconds.toString().slice(1), 10);
14181
+ {
14182
+ var seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 &&
14183
+ !this.isPersist() ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);
14184
+ this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;
14185
+ this.navigated = this.navigated ? false : this.navigated;
14186
+ if (isNaN(seconds)) {
14187
+ return;
14188
+ }
14189
+ for (var i = 0; seconds > 59; i++) {
14190
+ seconds = parseInt(seconds.toString().slice(1), 10);
14191
+ }
14192
+ newDateValue.setSeconds(seconds);
14193
+ this.isNavigate = seconds.toString().length === 2;
14194
+ this.isSecondsPart = true;
14195
+ this.secondTypeCount = this.secondTypeCount + 1;
14196
+ break;
14136
14197
  }
14137
- newDateValue.setSeconds(seconds);
14138
- this.isNavigate = seconds.toString().length === 2;
14139
- this.isSecondsPart = true;
14140
- this.secondTypeCount = this.secondTypeCount + 1;
14141
- break;
14142
14198
  case 'a':
14143
- this.periodCharacter += newVal[start - 1].toLowerCase();
14144
- // let periodString: string[] = <string[]>(getValue('dayPeriods.format.wide', getDefaultDateObject()));;
14145
- var periodString = (this.getCulturedValue('dayPeriods.format.wide'));
14146
- var periodkeys = Object.keys(periodString);
14147
- //periodString[periodkeys[0]] : periodString[periodkeys[1]] : periodString[periodkeys[0]];
14148
- for (var i = 0; this.periodCharacter.length > 0; i++) {
14149
- if ((periodString[periodkeys[0]].toLowerCase().indexOf(this.periodCharacter) === 0 && newDateValue.getHours() >= 12) || (periodString[periodkeys[1]].toLowerCase().indexOf(this.periodCharacter) === 0 && newDateValue.getHours() < 12)) {
14150
- newDateValue.setHours((newDateValue.getHours() + 12) % 24);
14151
- this.maskDateValue = newDateValue;
14152
- }
14153
- this.periodCharacter = this.periodCharacter.substring(1, this.periodCharacter.length);
14154
- // Object.values()
14199
+ {
14200
+ this.periodCharacter += newVal[start - 1].toLowerCase();
14201
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14202
+ var periodString = (this.getCulturedValue('dayPeriods.format.wide'));
14203
+ var periodkeys = Object.keys(periodString);
14204
+ for (var i = 0; this.periodCharacter.length > 0; i++) {
14205
+ if ((periodString[periodkeys[0]].toLowerCase().indexOf(this.periodCharacter) === 0
14206
+ && newDateValue.getHours() >= 12) || (periodString[periodkeys[1]].toLowerCase().
14207
+ indexOf(this.periodCharacter) === 0 && newDateValue.getHours() < 12)) {
14208
+ newDateValue.setHours((newDateValue.getHours() + 12) % 24);
14209
+ this.maskDateValue = newDateValue;
14210
+ }
14211
+ this.periodCharacter = this.periodCharacter.substring(1, this.periodCharacter.length);
14212
+ }
14213
+ break;
14155
14214
  }
14156
- break;
14157
14215
  default:
14158
14216
  break;
14159
14217
  }
14160
14218
  this.maskDateValue = newDateValue;
14161
14219
  };
14220
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14162
14221
  MaskedDateTime.prototype.formatCheck = function () {
14222
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
14163
14223
  var proxy = this;
14164
14224
  function formatValueSpecifier(formattext) {
14165
14225
  var result;
14226
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14166
14227
  var daysAbbreviated = proxy.getCulturedValue('days[stand-alone].abbreviated');
14167
14228
  var dayKeyAbbreviated = Object.keys(daysAbbreviated);
14229
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14168
14230
  var daysWide = (proxy.getCulturedValue('days[stand-alone].wide'));
14169
14231
  var dayKeyWide = Object.keys(daysWide);
14232
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14170
14233
  var daysNarrow = (proxy.getCulturedValue('days[stand-alone].narrow'));
14171
14234
  var dayKeyNarrow = Object.keys(daysNarrow);
14172
14235
  var monthAbbreviated = (proxy.getCulturedValue('months[stand-alone].abbreviated'));
14173
14236
  var monthWide = (proxy.getCulturedValue('months[stand-alone].wide'));
14237
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14174
14238
  var periodString = (proxy.getCulturedValue('dayPeriods.format.wide'));
14175
14239
  var periodkeys = Object.keys(periodString);
14176
14240
  var milliseconds;
@@ -14181,7 +14245,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14181
14245
  case 'd':
14182
14246
  result = proxy.isDayPart ? proxy.maskDateValue.getDate().toString() : proxy.defaultConstant['day'].toString();
14183
14247
  result = proxy.zeroCheck(proxy.isDateZero, proxy.isDayPart, result);
14184
- if (proxy.dayTypeCount == 2) {
14248
+ if (proxy.dayTypeCount === 2) {
14185
14249
  proxy.isNavigate = true;
14186
14250
  proxy.dayTypeCount = 0;
14187
14251
  }
@@ -14189,7 +14253,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14189
14253
  case 'dd':
14190
14254
  result = proxy.isDayPart ? proxy.roundOff(proxy.maskDateValue.getDate(), 2) : proxy.defaultConstant['day'].toString();
14191
14255
  result = proxy.zeroCheck(proxy.isDateZero, proxy.isDayPart, result);
14192
- if (proxy.dayTypeCount == 2) {
14256
+ if (proxy.dayTypeCount === 2) {
14193
14257
  proxy.isNavigate = true;
14194
14258
  proxy.dayTypeCount = 0;
14195
14259
  }
@@ -14208,7 +14272,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14208
14272
  case 'M':
14209
14273
  result = proxy.isMonthPart ? (proxy.maskDateValue.getMonth() + 1).toString() : proxy.defaultConstant['month'].toString();
14210
14274
  result = proxy.zeroCheck(proxy.isMonthZero, proxy.isMonthPart, result);
14211
- if (proxy.monthTypeCount == 2) {
14275
+ if (proxy.monthTypeCount === 2) {
14212
14276
  proxy.isNavigate = true;
14213
14277
  proxy.monthTypeCount = 0;
14214
14278
  }
@@ -14216,7 +14280,7 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14216
14280
  case 'MM':
14217
14281
  result = proxy.isMonthPart ? proxy.roundOff(proxy.maskDateValue.getMonth() + 1, 2) : proxy.defaultConstant['month'].toString();
14218
14282
  result = proxy.zeroCheck(proxy.isMonthZero, proxy.isMonthPart, result);
14219
- if (proxy.monthTypeCount == 2) {
14283
+ if (proxy.monthTypeCount === 2) {
14220
14284
  proxy.isNavigate = true;
14221
14285
  proxy.monthTypeCount = 0;
14222
14286
  }
@@ -14241,56 +14305,56 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14241
14305
  break;
14242
14306
  case 'h':
14243
14307
  result = proxy.isHourPart ? (proxy.maskDateValue.getHours() % 12 || 12).toString() : proxy.defaultConstant['hour'].toString();
14244
- if (proxy.hourTypeCount == 2) {
14308
+ if (proxy.hourTypeCount === 2) {
14245
14309
  proxy.isNavigate = true;
14246
14310
  proxy.hourTypeCount = 0;
14247
14311
  }
14248
14312
  break;
14249
14313
  case 'hh':
14250
14314
  result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours() % 12 || 12, 2) : proxy.defaultConstant['hour'].toString();
14251
- if (proxy.hourTypeCount == 2) {
14315
+ if (proxy.hourTypeCount === 2) {
14252
14316
  proxy.isNavigate = true;
14253
14317
  proxy.hourTypeCount = 0;
14254
14318
  }
14255
14319
  break;
14256
14320
  case 'H':
14257
14321
  result = proxy.isHourPart ? proxy.maskDateValue.getHours().toString() : proxy.defaultConstant['hour'].toString();
14258
- if (proxy.hourTypeCount == 2) {
14322
+ if (proxy.hourTypeCount === 2) {
14259
14323
  proxy.isNavigate = true;
14260
14324
  proxy.hourTypeCount = 0;
14261
14325
  }
14262
14326
  break;
14263
14327
  case 'HH':
14264
14328
  result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours(), 2) : proxy.defaultConstant['hour'].toString();
14265
- if (proxy.hourTypeCount == 2) {
14329
+ if (proxy.hourTypeCount === 2) {
14266
14330
  proxy.isNavigate = true;
14267
14331
  proxy.hourTypeCount = 0;
14268
14332
  }
14269
14333
  break;
14270
14334
  case 'm':
14271
14335
  result = proxy.isMinutePart ? proxy.maskDateValue.getMinutes().toString() : proxy.defaultConstant['minute'].toString();
14272
- if (proxy.minuteTypeCount == 2) {
14336
+ if (proxy.minuteTypeCount === 2) {
14273
14337
  proxy.isNavigate = true;
14274
14338
  proxy.minuteTypeCount = 0;
14275
14339
  }
14276
14340
  break;
14277
14341
  case 'mm':
14278
14342
  result = proxy.isMinutePart ? proxy.roundOff(proxy.maskDateValue.getMinutes(), 2) : proxy.defaultConstant['minute'].toString();
14279
- if (proxy.minuteTypeCount == 2) {
14343
+ if (proxy.minuteTypeCount === 2) {
14280
14344
  proxy.isNavigate = true;
14281
14345
  proxy.minuteTypeCount = 0;
14282
14346
  }
14283
14347
  break;
14284
14348
  case 's':
14285
14349
  result = proxy.isSecondsPart ? proxy.maskDateValue.getSeconds().toString() : proxy.defaultConstant['second'].toString();
14286
- if (proxy.secondTypeCount == 2) {
14350
+ if (proxy.secondTypeCount === 2) {
14287
14351
  proxy.isNavigate = true;
14288
14352
  proxy.secondTypeCount = 0;
14289
14353
  }
14290
14354
  break;
14291
14355
  case 'ss':
14292
14356
  result = proxy.isSecondsPart ? proxy.roundOff(proxy.maskDateValue.getSeconds(), 2) : proxy.defaultConstant['second'].toString();
14293
- if (proxy.secondTypeCount == 2) {
14357
+ if (proxy.secondTypeCount === 2) {
14294
14358
  proxy.isNavigate = true;
14295
14359
  proxy.secondTypeCount = 0;
14296
14360
  }
@@ -14339,14 +14403,12 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14339
14403
  };
14340
14404
  MaskedDateTime.prototype.maskInputHandler = function () {
14341
14405
  var start = this.parent.inputElement.selectionStart;
14342
- var selectionChar = this.previousHiddenMask[start - 1];
14343
14406
  var formatText = '';
14344
14407
  if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
14345
14408
  formatText = this.hiddenMask[start];
14346
14409
  }
14347
- var inputValue;
14348
14410
  this.differenceCheck();
14349
- inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
14411
+ var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
14350
14412
  this.isHiddenMask = true;
14351
14413
  this.hiddenMask = this.dateformat.replace(this.formatRegex, this.formatCheck());
14352
14414
  this.isDateZero = this.isMonthZero = this.isYearZero = false;
@@ -14372,8 +14434,6 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14372
14434
  this.isDeletion = false;
14373
14435
  }
14374
14436
  this.isDeleteKey = false;
14375
- // this.setSelection(selectionChar);
14376
- // this.navigateSelection(inputValue);
14377
14437
  };
14378
14438
  MaskedDateTime.prototype.navigateSelection = function (isbackward) {
14379
14439
  var start = this.parent.inputElement.selectionStart;
@@ -14454,24 +14514,26 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14454
14514
  newDateValue.setDate(newDateValue.getDate() + incrementValue);
14455
14515
  break;
14456
14516
  case 'M':
14457
- var newMonth = newDateValue.getMonth() + incrementValue;
14458
- newDateValue.setDate(1);
14459
- newDateValue.setMonth(newMonth);
14460
- if (this.isDayPart) {
14461
- var previousMaxDate = new Date(this.previousDate.getFullYear(), this.previousDate.getMonth() + 1, 0).getDate();
14462
- var currentMaxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();
14463
- if (this.previousDate.getDate() == previousMaxDate && currentMaxDate <= previousMaxDate) {
14464
- newDateValue.setDate(currentMaxDate);
14517
+ {
14518
+ var newMonth = newDateValue.getMonth() + incrementValue;
14519
+ newDateValue.setDate(1);
14520
+ newDateValue.setMonth(newMonth);
14521
+ if (this.isDayPart) {
14522
+ var previousMaxDate = new Date(this.previousDate.getFullYear(), this.previousDate.getMonth() + 1, 0).getDate();
14523
+ var currentMaxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();
14524
+ if (this.previousDate.getDate() === previousMaxDate && currentMaxDate <= previousMaxDate) {
14525
+ newDateValue.setDate(currentMaxDate);
14526
+ }
14527
+ else {
14528
+ newDateValue.setDate(this.previousDate.getDate());
14529
+ }
14465
14530
  }
14466
14531
  else {
14467
14532
  newDateValue.setDate(this.previousDate.getDate());
14468
14533
  }
14534
+ this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14535
+ break;
14469
14536
  }
14470
- else {
14471
- newDateValue.setDate(this.previousDate.getDate());
14472
- }
14473
- this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());
14474
- break;
14475
14537
  case 'y':
14476
14538
  newDateValue.setFullYear(newDateValue.getFullYear() + incrementValue);
14477
14539
  break;
@@ -14509,19 +14571,19 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14509
14571
  };
14510
14572
  MaskedDateTime.prototype.getCulturedFormat = function () {
14511
14573
  var formatString = (this.getCulturedValue('dateTimeFormats[availableFormats].yMd')).toString();
14512
- if (this.parent.moduleName == 'datepicker') {
14574
+ if (this.parent.moduleName === 'datepicker') {
14513
14575
  formatString = (this.getCulturedValue('dateTimeFormats[availableFormats].yMd')).toString();
14514
14576
  if (this.parent.format && this.parent.formatString) {
14515
14577
  formatString = this.parent.formatString;
14516
14578
  }
14517
14579
  }
14518
- if (this.parent.moduleName == 'datetimepicker') {
14580
+ if (this.parent.moduleName === 'datetimepicker') {
14519
14581
  formatString = (this.getCulturedValue('dateTimeFormats[availableFormats].yMd')).toString();
14520
14582
  if (this.parent.dateTimeFormat) {
14521
14583
  formatString = this.parent.dateTimeFormat;
14522
14584
  }
14523
14585
  }
14524
- if (this.parent.moduleName == 'timepicker') {
14586
+ if (this.parent.moduleName === 'timepicker') {
14525
14587
  formatString = this.parent.cldrTimeFormat();
14526
14588
  }
14527
14589
  return formatString;
@@ -14539,7 +14601,6 @@ var MaskedDateTime = /** @__PURE__ @class */ (function () {
14539
14601
  this.previousHiddenMask = this.hiddenMask;
14540
14602
  this.previousValue = inputValue;
14541
14603
  this.parent.updateInputValue(inputValue);
14542
- //this.parent.inputElement.value = inputValue;
14543
14604
  };
14544
14605
  MaskedDateTime.prototype.destroy = function () {
14545
14606
  this.removeEventListener();