@syncfusion/ej2-calendars 20.3.59 → 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 -26
  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 +181 -75
  7. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  8. package/dist/es6/ej2-calendars.es5.js +180 -74
  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 +37 -19
  15. package/src/calendar/islamic.js +29 -7
  16. package/src/datepicker/datepicker.js +24 -14
  17. package/src/daterangepicker/daterangepicker.d.ts +0 -1
  18. package/src/daterangepicker/daterangepicker.js +43 -24
  19. package/src/datetimepicker/datetimepicker.js +10 -2
  20. package/src/maskbase/masked-date-time.js +24 -0
  21. package/src/timepicker/timepicker.js +13 -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
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.59
3
+ * version : 20.4.38
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-calendars@*",
3
- "_id": "@syncfusion/ej2-calendars@20.3.56",
3
+ "_id": "@syncfusion/ej2-calendars@18.30.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Ruq5H/efzwn90dzWPXHtOMLKw0C0r9X4c56Wo/xC7kdvSez6OhDMH9ibbkzKzKu9RI42sZzk4I1qgdtKFPfBjA==",
5
+ "_integrity": "sha512-tDGyq6I+jfuzYUGXH7t5y5OIydy6bskD2G2BPK7n4SDhjclE4GW2mA3SIHvx1ZwtgPNdWPCPxHeWdQL7xDH0NA==",
6
6
  "_location": "/@syncfusion/ej2-calendars",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -32,8 +32,8 @@
32
32
  "/@syncfusion/ej2-schedule",
33
33
  "/@syncfusion/ej2-vue-calendars"
34
34
  ],
35
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-20.3.56.tgz",
36
- "_shasum": "81a48cf30eb42c22559d20b194d6baef18effc12",
35
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-calendars/-/ej2-calendars-18.30.7.tgz",
36
+ "_shasum": "6dec75fe63027aeab8ab2417b2e50ceff68c68c0",
37
37
  "_spec": "@syncfusion/ej2-calendars@*",
38
38
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
39
39
  "author": {
@@ -44,11 +44,11 @@
44
44
  },
45
45
  "bundleDependencies": false,
46
46
  "dependencies": {
47
- "@syncfusion/ej2-base": "~20.3.56",
48
- "@syncfusion/ej2-buttons": "~20.3.58",
49
- "@syncfusion/ej2-inputs": "~20.3.57",
50
- "@syncfusion/ej2-lists": "~20.3.56",
51
- "@syncfusion/ej2-popups": "~20.3.59"
47
+ "@syncfusion/ej2-base": "~20.4.38",
48
+ "@syncfusion/ej2-buttons": "~20.4.38",
49
+ "@syncfusion/ej2-inputs": "~20.4.38",
50
+ "@syncfusion/ej2-lists": "~20.4.38",
51
+ "@syncfusion/ej2-popups": "~20.4.38"
52
52
  },
53
53
  "deprecated": false,
54
54
  "description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
@@ -81,6 +81,6 @@
81
81
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
82
82
  },
83
83
  "typings": "index.d.ts",
84
- "version": "20.3.59",
84
+ "version": "20.4.38",
85
85
  "sideEffects": false
86
86
  }
@@ -289,9 +289,11 @@ var CalendarBase = /** @class */ (function (_super) {
289
289
  else {
290
290
  cldrObj = (this.getCultureObjects(cldrData, '' + this.locale));
291
291
  }
292
- for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
293
- var obj = _a[_i];
294
- culShortNames.push(getValue(obj, cldrObj));
292
+ if (!isNullOrUndefined(cldrObj)) {
293
+ for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
294
+ var obj = _a[_i];
295
+ culShortNames.push(getValue(obj, cldrObj));
296
+ }
295
297
  }
296
298
  return culShortNames;
297
299
  };
@@ -325,9 +327,11 @@ var CalendarBase = /** @class */ (function (_super) {
325
327
  }
326
328
  }
327
329
  // eslint-disable-next-line max-len
328
- var shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
329
- for (var days = 0; days <= daysCount; days++) {
330
- html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
330
+ var shortNames = this.getCultureValues().length > 0 && this.getCultureValues() ? this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek) : null;
331
+ if (!isNullOrUndefined(shortNames)) {
332
+ for (var days = 0; days <= daysCount; days++) {
333
+ html += '<th class="">' + this.toCapitalize(shortNames[days]) + '</th>';
334
+ }
331
335
  }
332
336
  html = '<tr>' + html + '</tr>';
333
337
  this.tableHeadElement.innerHTML = html;
@@ -509,7 +513,7 @@ var CalendarBase = /** @class */ (function (_super) {
509
513
  e.preventDefault();
510
514
  break;
511
515
  case 'controlDown':
512
- if (!isNullOrUndefined(focusedDate) || !isNullOrUndefined(selectedDate) && !levelRestrict) {
516
+ if (!isNullOrUndefined(focusedDate) && !levelRestrict || !isNullOrUndefined(selectedDate) && !levelRestrict) {
513
517
  this.contentClick(null, --view, (focusedDate || selectedDate), value);
514
518
  }
515
519
  e.preventDefault();
@@ -1134,9 +1138,6 @@ var CalendarBase = /** @class */ (function (_super) {
1134
1138
  case 0:
1135
1139
  detach(this.tableBodyElement);
1136
1140
  this.renderMonths(e, null, isCustomDate);
1137
- if (multiSelection && !isNullOrUndefined(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0])) {
1138
- this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);
1139
- }
1140
1141
  break;
1141
1142
  case 1:
1142
1143
  detach(this.tableBodyElement);
@@ -1442,7 +1443,9 @@ var CalendarBase = /** @class */ (function (_super) {
1442
1443
  }
1443
1444
  }
1444
1445
  if (this.getModuleName() === 'calendar' && this.element) {
1445
- EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
1446
+ if (!isNullOrUndefined(this.headerTitleElement)) {
1447
+ EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
1448
+ }
1446
1449
  if (this.todayElement) {
1447
1450
  EventHandler.remove(this.todayElement, 'click', this.todayButtonClick);
1448
1451
  }
@@ -1460,6 +1463,17 @@ var CalendarBase = /** @class */ (function (_super) {
1460
1463
  if (this.element) {
1461
1464
  this.element.innerHTML = '';
1462
1465
  }
1466
+ this.todayElement = null;
1467
+ this.tableBodyElement = null;
1468
+ this.renderDayCellArgs = null;
1469
+ this.headerElement = null;
1470
+ this.nextIcon = null;
1471
+ this.table = null;
1472
+ this.tableHeadElement = null;
1473
+ this.previousIcon = null;
1474
+ this.headerTitleElement = null;
1475
+ this.footer = null;
1476
+ this.contentElement = null;
1463
1477
  _super.prototype.destroy.call(this);
1464
1478
  };
1465
1479
  CalendarBase.prototype.title = function (e) {
@@ -1764,10 +1778,12 @@ var CalendarBase = /** @class */ (function (_super) {
1764
1778
  };
1765
1779
  CalendarBase.prototype.previousIconHandler = function (disabled) {
1766
1780
  if (disabled) {
1767
- EventHandler.remove(this.previousIcon, 'click', this.navigatePreviousHandler);
1768
- addClass([this.previousIcon], '' + DISABLED);
1769
- addClass([this.previousIcon], '' + OVERLAY);
1770
- this.previousIcon.setAttribute('aria-disabled', 'true');
1781
+ if (!isNullOrUndefined(this.previousIcon)) {
1782
+ EventHandler.remove(this.previousIcon, 'click', this.navigatePreviousHandler);
1783
+ addClass([this.previousIcon], '' + DISABLED);
1784
+ addClass([this.previousIcon], '' + OVERLAY);
1785
+ this.previousIcon.setAttribute('aria-disabled', 'true');
1786
+ }
1771
1787
  }
1772
1788
  else {
1773
1789
  EventHandler.add(this.previousIcon, 'click', this.navigatePreviousHandler);
@@ -1790,10 +1806,12 @@ var CalendarBase = /** @class */ (function (_super) {
1790
1806
  };
1791
1807
  CalendarBase.prototype.nextIconHandler = function (disabled) {
1792
1808
  if (disabled) {
1793
- EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);
1794
- addClass([this.nextIcon], DISABLED);
1795
- addClass([this.nextIcon], OVERLAY);
1796
- this.nextIcon.setAttribute('aria-disabled', 'true');
1809
+ if (!isNullOrUndefined(this.previousIcon)) {
1810
+ EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);
1811
+ addClass([this.nextIcon], DISABLED);
1812
+ addClass([this.nextIcon], OVERLAY);
1813
+ this.nextIcon.setAttribute('aria-disabled', 'true');
1814
+ }
1797
1815
  }
1798
1816
  else {
1799
1817
  EventHandler.add(this.nextIcon, 'click', this.navigateNextHandler);
@@ -180,8 +180,11 @@ var Islamic = /** @class */ (function () {
180
180
  }
181
181
  break;
182
182
  case 'Decade': {
183
+ var startIslamicYear = 1361;
184
+ var gregorianValue = HijriParser.toGregorian(startIslamicYear, 1, 1);
183
185
  var prevDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.min) < 1;
184
186
  var nextDecadeCompare = this.hijriCompareDecade(date, this.calendarInstance.max) > -1;
187
+ prevDecadeCompare = HijriParser.toGregorian(this.calendarInstance.headerTitleElement.textContent.split('-')[0].trim(), 1, 1).getFullYear() === gregorianValue.getFullYear() ? true : prevDecadeCompare;
185
188
  this.calendarInstance.previousIconHandler(prevDecadeCompare);
186
189
  this.calendarInstance.nextIconHandler(nextDecadeCompare);
187
190
  }
@@ -202,7 +205,9 @@ var Islamic = /** @class */ (function () {
202
205
  break;
203
206
  case 'Decade':
204
207
  this.calendarInstance.nextIconClicked = true;
205
- islamicDate.year = islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1 ? islamicDate.year + 1 : islamicDate.year;
208
+ if (islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1) {
209
+ islamicDate.year = islamicDate.year - this.calendarInstance.headerElement.textContent.split('-')[0].trim() === 1 ? islamicDate.year + 1 : islamicDate.year;
210
+ }
206
211
  this.calendarInstance.currentDate = this.toGregorian(islamicDate.year + 10, islamicDate.month, 1);
207
212
  this.calendarInstance.switchView(view);
208
213
  break;
@@ -292,12 +297,16 @@ var Islamic = /** @class */ (function () {
292
297
  var endFullYr = endYr.getFullYear();
293
298
  var startHdrYr = this.calendarInstance.globalize.formatDate(startYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
294
299
  var endHdrYr = this.calendarInstance.globalize.formatDate(endYr, { type: 'dateTime', format: 'y', calendar: 'islamic' });
300
+ var splityear = this.calendarInstance.headerElement.textContent.split('-');
301
+ if ((!isNullOrUndefined(e) && (splityear[0] !== startHdrYr) && e.action === 'home') || (!isNullOrUndefined(e) && e.type === 'keydown' && e.action === 'end')) {
302
+ startHdrYr = this.calendarInstance.headerElement.textContent.split('-')[0].trim();
303
+ endHdrYr = this.calendarInstance.headerElement.textContent.split('-')[1].trim();
304
+ }
295
305
  if (this.calendarInstance.islamicPreviousHeader) {
296
306
  startHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[0].trim();
297
307
  endHdrYr = this.calendarInstance.islamicPreviousHeader.split('-')[1].trim();
298
308
  this.calendarInstance.islamicPreviousHeader = null;
299
309
  }
300
- var splityear = this.calendarInstance.headerElement.textContent.split('-');
301
310
  if (this.calendarInstance.previousIconClicked) {
302
311
  for (var i = 0; i <= splityear.length; i++) {
303
312
  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;
@@ -305,11 +314,21 @@ var Islamic = /** @class */ (function () {
305
314
  endHdrYr = (parseInt(endHdrYr) - 1).toString();
306
315
  }
307
316
  }
317
+ if (endHdrYr - splityear[i] === 8 || splityear[i] - endHdrYr === 8) {
318
+ endHdrYr = (parseInt(endHdrYr) - 9).toString();
319
+ startHdrYr = (parseInt(endHdrYr) - 9).toString();
320
+ }
321
+ if (endHdrYr - splityear[i] === 7 || splityear[i] - endHdrYr === 7) {
322
+ endHdrYr = (parseInt(endHdrYr) - 8).toString();
323
+ startHdrYr = (parseInt(endHdrYr) - 9).toString();
324
+ }
308
325
  startHdrYr = endHdrYr - startHdrYr === 10
309
326
  ? (parseInt(startHdrYr) + 1).toString() : endHdrYr - startHdrYr === 11
310
327
  ? (parseInt(startHdrYr) + 2).toString() : endHdrYr - startHdrYr === 12
311
328
  ? (parseInt(startHdrYr) + 3).toString() : startHdrYr;
312
- startHdrYr = endHdrYr - startHdrYr === 8 ? (parseInt(startHdrYr) - 1).toString() : startHdrYr;
329
+ if (endHdrYr - startHdrYr === 8) {
330
+ startHdrYr = (parseInt(startHdrYr) - 1).toString();
331
+ }
313
332
  }
314
333
  if (this.calendarInstance.nextIconClicked) {
315
334
  for (var i = 0; i <= splityear.length; i++) {
@@ -323,6 +342,10 @@ var Islamic = /** @class */ (function () {
323
342
  startHdrYr = (parseInt(startHdrYr) + 2).toString();
324
343
  }
325
344
  }
345
+ if (startHdrYr - this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim() > 1) {
346
+ startHdrYr = (parseInt(this.calendarInstance.headerTitleElement.textContent.split('-')[1].trim()) + 1).toString();
347
+ endHdrYr = (parseInt(startHdrYr) + 9).toString();
348
+ }
326
349
  endHdrYr = endHdrYr - startHdrYr === 10 ? (parseInt(endHdrYr) - 1).toString() : endHdrYr;
327
350
  endHdrYr = endHdrYr - startHdrYr === 7
328
351
  ? (parseInt(endHdrYr) + 2).toString() : endHdrYr - startHdrYr === 8
@@ -358,10 +381,6 @@ var Islamic = /** @class */ (function () {
358
381
  else if (year_1 < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
359
382
  || year_1 > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
360
383
  addClass([tdEle], DISABLED);
361
- if (year_1 < new Date(this.islamicInValue(this.calendarInstance.min)).getFullYear()
362
- || year_1 > new Date(this.islamicInValue(this.calendarInstance.max)).getFullYear()) {
363
- addClass([tdEle], DISABLED);
364
- }
365
384
  }
366
385
  else if (!isNullOrUndefined(value) &&
367
386
  (this.getIslamicDate(localDate)).year ===
@@ -377,6 +396,9 @@ var Islamic = /** @class */ (function () {
377
396
  EventHandler.add(tdEle, 'click', this.calendarInstance.clickHandler, this.calendarInstance);
378
397
  }
379
398
  tdEle.appendChild(dayLink);
399
+ if ((!isNullOrUndefined(e) && e.action === 'home' && islamicDate.year.toString() === startHdrYr) || (!isNullOrUndefined(e) && e.action === 'end' && islamicDate.year.toString() === endHdrYr)) {
400
+ addClass([tdEle], FOCUSEDDATE);
401
+ }
380
402
  tdEles.push(tdEle);
381
403
  }
382
404
  }
@@ -450,7 +450,9 @@ var DatePicker = /** @class */ (function (_super) {
450
450
  }
451
451
  };
452
452
  DatePicker.prototype.unBindEvents = function () {
453
- EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler);
453
+ if (!isNullOrUndefined(this.inputWrapper)) {
454
+ EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateIconHandler);
455
+ }
454
456
  EventHandler.remove(this.inputElement, 'mouseup', this.mouseUpHandler);
455
457
  EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
456
458
  EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
@@ -582,10 +584,10 @@ var DatePicker = /** @class */ (function (_super) {
582
584
  if (!isNullOrUndefined(this.htmlAttributes)) {
583
585
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
584
586
  var key = _a[_i];
585
- if (!isNullOrUndefined(this.htmlAttributes[key])) {
587
+ if (!isNullOrUndefined(this.htmlAttributes["" + key])) {
586
588
  if (containerAttr.indexOf(key) > -1) {
587
589
  if (key === 'class') {
588
- var updatedClassValues = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
590
+ var updatedClassValues = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
589
591
  if (updatedClassValues !== '') {
590
592
  addClass([this.inputWrapper.container], updatedClassValues.split(' '));
591
593
  }
@@ -594,19 +596,19 @@ var DatePicker = /** @class */ (function (_super) {
594
596
  var setStyle = this.inputWrapper.container.getAttribute(key);
595
597
  if (!isNullOrUndefined(setStyle)) {
596
598
  if (setStyle.charAt(setStyle.length - 1) === ';') {
597
- setStyle = setStyle + this.htmlAttributes[key];
599
+ setStyle = setStyle + this.htmlAttributes["" + key];
598
600
  }
599
601
  else {
600
- setStyle = setStyle + ';' + this.htmlAttributes[key];
602
+ setStyle = setStyle + ';' + this.htmlAttributes["" + key];
601
603
  }
602
604
  }
603
605
  else {
604
- setStyle = this.htmlAttributes[key];
606
+ setStyle = this.htmlAttributes["" + key];
605
607
  }
606
608
  this.inputWrapper.container.setAttribute(key, setStyle);
607
609
  }
608
610
  else {
609
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
611
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
610
612
  }
611
613
  }
612
614
  }
@@ -618,7 +620,7 @@ var DatePicker = /** @class */ (function (_super) {
618
620
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
619
621
  var key = _a[_i];
620
622
  if (containerAttr.indexOf(key) < 0) {
621
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
623
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
622
624
  }
623
625
  }
624
626
  }
@@ -730,12 +732,12 @@ var DatePicker = /** @class */ (function (_super) {
730
732
  this.isPopupClicked = false;
731
733
  };
732
734
  DatePicker.prototype.documentHandler = function (e) {
733
- if ((!isNullOrUndefined(this.popupObj) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||
735
+ if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||
734
736
  (this.popupObj.element && this.popupObj.element.contains(e.target)))) && e.type !== 'touchstart') {
735
737
  e.preventDefault();
736
738
  }
737
739
  var target = e.target;
738
- if (!(closest(target, '.e-datepicker.e-popup-wrapper'))
740
+ if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
739
741
  && !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
740
742
  && (!target.classList.contains('e-day'))) {
741
743
  this.hide(e);
@@ -1374,7 +1376,9 @@ var DatePicker = /** @class */ (function (_super) {
1374
1376
  DatePicker.prototype.destroy = function () {
1375
1377
  this.unBindEvents();
1376
1378
  _super.prototype.destroy.call(this);
1377
- this.keyboardModules.destroy();
1379
+ if (!isNullOrUndefined(this.keyboardModules)) {
1380
+ this.keyboardModules.destroy();
1381
+ }
1378
1382
  if (this.popupObj && this.popupObj.element.classList.contains(POPUP)) {
1379
1383
  _super.prototype.destroy.call(this);
1380
1384
  }
@@ -1404,15 +1408,21 @@ var DatePicker = /** @class */ (function (_super) {
1404
1408
  }
1405
1409
  if (this.ngTag === null) {
1406
1410
  if (this.inputElement) {
1407
- this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
1411
+ if (!isNullOrUndefined(this.inputWrapper)) {
1412
+ this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
1413
+ }
1408
1414
  removeClass([this.inputElement], [INPUTROOT]);
1409
1415
  }
1410
1416
  removeClass([this.element], [ROOT]);
1411
- detach(this.inputWrapper.container);
1417
+ if (!isNullOrUndefined(this.inputWrapper)) {
1418
+ detach(this.inputWrapper.container);
1419
+ }
1412
1420
  }
1413
1421
  if (this.formElement) {
1414
1422
  EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
1415
1423
  }
1424
+ this.inputWrapper = null;
1425
+ this.keyboardModules = null;
1416
1426
  };
1417
1427
  DatePicker.prototype.ensureInputAttribute = function () {
1418
1428
  var prop = [];
@@ -1870,7 +1880,7 @@ var DatePicker = /** @class */ (function (_super) {
1870
1880
  }
1871
1881
  break;
1872
1882
  }
1873
- if (!this.isDynamicValueChanged && !this.isIconClicked) {
1883
+ if (!this.isDynamicValueChanged) {
1874
1884
  this.hide(null);
1875
1885
  }
1876
1886
  this.isDynamicValueChanged = false;
@@ -169,7 +169,6 @@ export declare class DateRangePicker extends CalendarBase {
169
169
  private mobileRangePopupWrap;
170
170
  protected isAngular: boolean;
171
171
  protected preventChange: boolean;
172
- protected isPropChanged: boolean;
173
172
  /**
174
173
  * Gets or sets the start and end date of the Calendar.
175
174
  * {% codeBlock src='daterangepicker/value/index.md' %}{% endcodeBlock %}
@@ -147,7 +147,6 @@ var DateRangePicker = /** @class */ (function (_super) {
147
147
  _this.invalidValueString = null;
148
148
  _this.isAngular = false;
149
149
  _this.preventChange = false;
150
- _this.isPropChanged = false;
151
150
  _this.dateRangeOptions = options;
152
151
  return _this;
153
152
  }
@@ -381,8 +380,8 @@ var DateRangePicker = /** @class */ (function (_super) {
381
380
  for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) {
382
381
  var pro = _a[_i];
383
382
  if (pro.indexOf('data') === 0) {
384
- this.firstHiddenChild.setAttribute(pro, attributes[pro]);
385
- this.secondHiddenChild.setAttribute(pro, attributes[pro]);
383
+ this.firstHiddenChild.setAttribute(pro, attributes["" + pro]);
384
+ this.secondHiddenChild.setAttribute(pro, attributes["" + pro]);
386
385
  }
387
386
  }
388
387
  };
@@ -430,19 +429,19 @@ var DateRangePicker = /** @class */ (function (_super) {
430
429
  var key = _a[_i];
431
430
  if (wrapperAttr.indexOf(key) > -1) {
432
431
  if (key === 'class') {
433
- var updatedClassValue = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
432
+ var updatedClassValue = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
434
433
  if (updatedClassValue !== '') {
435
434
  addClass([this.inputWrapper.container], updatedClassValue.split(' '));
436
435
  }
437
436
  }
438
437
  else if (key === 'style') {
439
438
  var dateRangeStyle = this.inputWrapper.container.getAttribute(key);
440
- dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes[key]) :
441
- this.htmlAttributes[key];
439
+ dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes["" + key]) :
440
+ this.htmlAttributes["" + key];
442
441
  this.inputWrapper.container.setAttribute(key, dateRangeStyle);
443
442
  }
444
443
  else {
445
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
444
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
446
445
  }
447
446
  }
448
447
  }
@@ -453,7 +452,7 @@ var DateRangePicker = /** @class */ (function (_super) {
453
452
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
454
453
  var key = _a[_i];
455
454
  if (wrapperAttr.indexOf(key) < 0) {
456
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
455
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
457
456
  }
458
457
  }
459
458
  }
@@ -1179,10 +1178,8 @@ var DateRangePicker = /** @class */ (function (_super) {
1179
1178
  case 'tab':
1180
1179
  if (this.tabKeyValidation(ele, LEFTCALENDER)) {
1181
1180
  ele = this.keyCalendarUpdate(false, ele, false);
1182
- var focusedCell = ele.querySelector('.e-focused-date');
1183
- if (isNullOrUndefined(focusedCell)) {
1184
- this.currentDate = this.firstCellToFocus(this.rightCalendar);
1185
- }
1181
+ this.currentDate = this.firstCellToFocus(this.rightCalendar);
1182
+ view = this.getViewNumber(this.currentView());
1186
1183
  this.keyboardNavigate(0, view, e, max, min);
1187
1184
  this.keyNavigation(ele, e);
1188
1185
  }
@@ -1190,10 +1187,7 @@ var DateRangePicker = /** @class */ (function (_super) {
1190
1187
  case 'shiftTab':
1191
1188
  if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
1192
1189
  ele = this.keyCalendarUpdate(true, ele, false);
1193
- var focusedCell = ele.querySelector('.e-focused-date');
1194
- if (isNullOrUndefined(focusedCell)) {
1195
- this.currentDate = this.firstCellToFocus(this.leftCalendar);
1196
- }
1190
+ this.currentDate = this.firstCellToFocus(this.leftCalendar);
1197
1191
  this.keyboardNavigate(0, view, e, max, min);
1198
1192
  this.keyNavigation(ele, e);
1199
1193
  }
@@ -1201,7 +1195,7 @@ var DateRangePicker = /** @class */ (function (_super) {
1201
1195
  }
1202
1196
  };
1203
1197
  DateRangePicker.prototype.firstCellToFocus = function (calendar) {
1204
- var focusAbleEle = calendar.children[1].firstElementChild.querySelector('td.e-cell:not(.e-week-number):not(.e-disabled):not(.e-other-month)');
1198
+ 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)');
1205
1199
  var focusEleID = focusAbleEle && focusAbleEle.id ? focusAbleEle.id.split('_')[0] : null;
1206
1200
  var currentFirstDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), 1);
1207
1201
  var focusDate = focusEleID ? new Date(+focusEleID) : currentFirstDay;
@@ -1428,7 +1422,11 @@ var DateRangePicker = /** @class */ (function (_super) {
1428
1422
  var leftHeader = this.leftCalendar.querySelector('.e-header');
1429
1423
  var isRightMonth = rightHeader ? rightHeader.classList.contains('e-month') : false;
1430
1424
  var isLeftMonth = leftHeader ? leftHeader.classList.contains('e-month') : false;
1431
- return isLeftCalendar && isLeftMonth && isRightMonth && !this.isMobile;
1425
+ var isRightYear = rightHeader ? rightHeader.classList.contains('e-year') : false;
1426
+ var isLeftYear = leftHeader ? leftHeader.classList.contains('e-year') : false;
1427
+ var isRightDecade = rightHeader ? rightHeader.classList.contains('e-decade') : false;
1428
+ var isLeftDecade = leftHeader ? leftHeader.classList.contains('e-decade') : false;
1429
+ return isLeftCalendar && (isLeftMonth || isLeftYear || isLeftDecade) && (isRightMonth || isRightYear || isRightDecade) && !this.isMobile;
1432
1430
  };
1433
1431
  DateRangePicker.prototype.keyNavigation = function (calendar, e) {
1434
1432
  this.bindCalendarCellEvents(calendar);
@@ -3805,6 +3803,30 @@ var DateRangePicker = /** @class */ (function (_super) {
3805
3803
  this.inputElement.setAttribute('name', this.element.getAttribute('data-name'));
3806
3804
  this.inputElement.removeAttribute('data-name');
3807
3805
  }
3806
+ this.closeEventArgs = null;
3807
+ this.leftCalendar = null;
3808
+ this.rightTitle = null;
3809
+ this.leftTitle = null;
3810
+ this.openEventArgs = null;
3811
+ this.leftCalNextIcon = null;
3812
+ this.rightCalendar = null;
3813
+ this.closeEventArgs = null;
3814
+ this.rightCalPrevIcon = null;
3815
+ this.leftCalPrevIcon = null;
3816
+ this.popupKeyboardModule = null;
3817
+ this.cancelButton = null;
3818
+ this.applyButton = null;
3819
+ this.calendarElement = null;
3820
+ this.leftKeyboardModule = null;
3821
+ this.rightCalNextIcon = null;
3822
+ this.leftCalNextIcon = null;
3823
+ this.btnKeyboardModule = null;
3824
+ this.rightKeyboardModule = null;
3825
+ this.leftKeyboardModule = null;
3826
+ this.presetKeyboardModule = null;
3827
+ this.liCollections = null;
3828
+ this.popupObj = null;
3829
+ this.popupWrapper = null;
3808
3830
  };
3809
3831
  DateRangePicker.prototype.ensureInputAttribute = function () {
3810
3832
  var attr = [];
@@ -4120,6 +4142,9 @@ var DateRangePicker = /** @class */ (function (_super) {
4120
4142
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
4121
4143
  var prop = _a[_i];
4122
4144
  var openPopup = ['maxDays', 'minDays', 'value'];
4145
+ if (openPopup.indexOf(prop) < 0) {
4146
+ this.hide(null);
4147
+ }
4123
4148
  switch (prop) {
4124
4149
  case 'width':
4125
4150
  this.setEleWidth(this.width);
@@ -4329,13 +4354,7 @@ var DateRangePicker = /** @class */ (function (_super) {
4329
4354
  this.setProperties({ depth: newProp.depth }, true);
4330
4355
  this.refreshChange();
4331
4356
  break;
4332
- default:
4333
- this.isPropChanged = true;
4334
- }
4335
- if (openPopup.indexOf(prop) < 0 && !this.isPropChanged) {
4336
- this.hide(null);
4337
4357
  }
4338
- this.isPropChanged = false;
4339
4358
  }
4340
4359
  };
4341
4360
  __decorate([
@@ -162,6 +162,14 @@ var DateTimePicker = /** @class */ (function (_super) {
162
162
  this.keyboardHandler.destroy();
163
163
  }
164
164
  this.unBindInputEvents();
165
+ this.liCollections = null;
166
+ this.rippleFn = null;
167
+ this.selectedElement = null;
168
+ this.listTag = null;
169
+ this.timeIcon = null;
170
+ this.popupObject = null;
171
+ this.preventArgs = null;
172
+ this.keyboardModule = null;
165
173
  _super.prototype.destroy.call(this);
166
174
  };
167
175
  /**
@@ -582,7 +590,7 @@ var DateTimePicker = /** @class */ (function (_super) {
582
590
  event.preventDefault();
583
591
  }
584
592
  if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
585
- && target !== this.timeIcon && target !== this.inputWrapper.container) {
593
+ && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
586
594
  if (this.isTimePopupOpen()) {
587
595
  this.hide(event);
588
596
  this.focusOut();
@@ -1460,7 +1468,7 @@ var DateTimePicker = /** @class */ (function (_super) {
1460
1468
  _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
1461
1469
  break;
1462
1470
  }
1463
- if (!this.isDynamicValueChanged && !this.isIconClicked) {
1471
+ if (!this.isDynamicValueChanged) {
1464
1472
  this.hide(null);
1465
1473
  }
1466
1474
  this.isDynamicValueChanged = false;
@@ -175,6 +175,10 @@ var MaskedDateTime = /** @class */ (function () {
175
175
  }
176
176
  if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWUP || args.e.key === ARROWDOWN)) {
177
177
  var start = this.parent.inputElement.selectionStart;
178
+ var formatText = '';
179
+ if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
180
+ formatText = this.hiddenMask[start];
181
+ }
178
182
  this.dateAlteration(args.e.key === ARROWDOWN ? true : false);
179
183
  var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
180
184
  this.isHiddenMask = true;
@@ -183,6 +187,12 @@ var MaskedDateTime = /** @class */ (function () {
183
187
  this.previousHiddenMask = this.hiddenMask;
184
188
  this.previousValue = inputValue;
185
189
  this.parent.inputElement.value = inputValue;
190
+ for (var i = 0; i < this.hiddenMask.length; i++) {
191
+ if (formatText === this.hiddenMask[i]) {
192
+ start = i;
193
+ break;
194
+ }
195
+ }
186
196
  this.parent.inputElement.selectionStart = start;
187
197
  this.validCharacterCheck();
188
198
  }
@@ -578,6 +588,10 @@ var MaskedDateTime = /** @class */ (function () {
578
588
  MaskedDateTime.prototype.maskInputHandler = function () {
579
589
  var start = this.parent.inputElement.selectionStart;
580
590
  var selectionChar = this.previousHiddenMask[start - 1];
591
+ var formatText = '';
592
+ if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {
593
+ formatText = this.hiddenMask[start];
594
+ }
581
595
  var inputValue;
582
596
  this.differenceCheck();
583
597
  inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());
@@ -588,6 +602,13 @@ var MaskedDateTime = /** @class */ (function () {
588
602
  this.previousHiddenMask = this.hiddenMask;
589
603
  this.previousValue = inputValue;
590
604
  this.parent.inputElement.value = inputValue;
605
+ this.parent.inputElement.value = inputValue;
606
+ for (var i = 0; i < this.hiddenMask.length; i++) {
607
+ if (formatText === this.hiddenMask[i]) {
608
+ start = i;
609
+ break;
610
+ }
611
+ }
591
612
  this.parent.inputElement.selectionStart = start;
592
613
  this.validCharacterCheck();
593
614
  if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {
@@ -595,6 +616,9 @@ var MaskedDateTime = /** @class */ (function () {
595
616
  this.isNavigate = this.isDeletion = false;
596
617
  this.navigateSelection(isbackward);
597
618
  }
619
+ if (this.isDeleteKey) {
620
+ this.isDeletion = false;
621
+ }
598
622
  this.isDeleteKey = false;
599
623
  // this.setSelection(selectionChar);
600
624
  // this.navigateSelection(inputValue);