@syncfusion/ej2-calendars 20.3.56 → 20.4.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +0 -24
  3. package/dist/ej2-calendars.min.js +2 -2
  4. package/dist/ej2-calendars.umd.min.js +2 -2
  5. package/dist/ej2-calendars.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-calendars.es2015.js +197 -76
  7. package/dist/es6/ej2-calendars.es2015.js.map +1 -1
  8. package/dist/es6/ej2-calendars.es5.js +196 -75
  9. package/dist/es6/ej2-calendars.es5.js.map +1 -1
  10. package/dist/global/ej2-calendars.min.js +2 -2
  11. package/dist/global/ej2-calendars.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +10 -10
  14. package/src/calendar/calendar.js +40 -19
  15. package/src/calendar/islamic.js +29 -7
  16. package/src/datepicker/datepicker.js +28 -15
  17. package/src/daterangepicker/daterangepicker.d.ts +0 -1
  18. package/src/daterangepicker/daterangepicker.js +46 -24
  19. package/src/datetimepicker/datetimepicker.js +13 -2
  20. package/src/maskbase/masked-date-time.js +24 -0
  21. package/src/timepicker/timepicker.js +16 -8
  22. package/styles/bootstrap-dark.css +7 -0
  23. package/styles/bootstrap.css +7 -0
  24. package/styles/bootstrap4.css +7 -0
  25. package/styles/bootstrap5-dark.css +8 -1
  26. package/styles/bootstrap5.css +7 -0
  27. package/styles/calendar/_fluent-definition.scss +1 -1
  28. package/styles/calendar/_material-definition.scss +3 -3
  29. package/styles/calendar/_theme.scss +1 -1
  30. package/styles/calendar/bootstrap5-dark.css +1 -1
  31. package/styles/calendar/fabric-dark.css +1 -1
  32. package/styles/calendar/fabric.css +1 -1
  33. package/styles/calendar/fluent-dark.css +3 -3
  34. package/styles/calendar/fluent.css +2 -2
  35. package/styles/calendar/material.css +3 -3
  36. package/styles/daterangepicker/_bootstrap-dark-definition.scss +1 -0
  37. package/styles/daterangepicker/_bootstrap-definition.scss +1 -0
  38. package/styles/daterangepicker/_bootstrap4-definition.scss +1 -0
  39. package/styles/daterangepicker/_bootstrap5-definition.scss +1 -0
  40. package/styles/daterangepicker/_fabric-dark-definition.scss +1 -0
  41. package/styles/daterangepicker/_fabric-definition.scss +1 -0
  42. package/styles/daterangepicker/_fluent-definition.scss +6 -0
  43. package/styles/daterangepicker/_fusionnew-definition.scss +1 -0
  44. package/styles/daterangepicker/_highcontrast-definition.scss +1 -0
  45. package/styles/daterangepicker/_highcontrast-light-definition.scss +1 -0
  46. package/styles/daterangepicker/_layout.scss +6 -0
  47. package/styles/daterangepicker/_material-dark-definition.scss +1 -0
  48. package/styles/daterangepicker/_material-definition.scss +1 -0
  49. package/styles/daterangepicker/_material3-definition.scss +1 -0
  50. package/styles/daterangepicker/_tailwind-definition.scss +1 -0
  51. package/styles/daterangepicker/_theme.scss +33 -0
  52. package/styles/daterangepicker/bootstrap-dark.css +7 -0
  53. package/styles/daterangepicker/bootstrap.css +7 -0
  54. package/styles/daterangepicker/bootstrap4.css +7 -0
  55. package/styles/daterangepicker/bootstrap5-dark.css +7 -0
  56. package/styles/daterangepicker/bootstrap5.css +7 -0
  57. package/styles/daterangepicker/fabric-dark.css +7 -0
  58. package/styles/daterangepicker/fabric.css +7 -0
  59. package/styles/daterangepicker/fluent-dark.css +30 -0
  60. package/styles/daterangepicker/fluent.css +30 -0
  61. package/styles/daterangepicker/highcontrast-light.css +7 -0
  62. package/styles/daterangepicker/highcontrast.css +7 -0
  63. package/styles/daterangepicker/material-dark.css +7 -0
  64. package/styles/daterangepicker/material.css +5 -0
  65. package/styles/daterangepicker/tailwind-dark.css +7 -0
  66. package/styles/daterangepicker/tailwind.css +7 -0
  67. package/styles/fabric-dark.css +8 -1
  68. package/styles/fabric.css +8 -1
  69. package/styles/fluent-dark.css +33 -3
  70. package/styles/fluent.css +32 -2
  71. package/styles/highcontrast-light.css +7 -0
  72. package/styles/highcontrast.css +7 -0
  73. package/styles/material-dark.css +7 -0
  74. package/styles/material.css +8 -3
  75. package/styles/tailwind-dark.css +7 -0
  76. package/styles/tailwind.css +7 -0
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.56
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.49",
3
+ "_id": "@syncfusion/ej2-calendars@18.30.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Z2zS5NoplHbrsF2xLIkWSZFji/kj55Lia2JO9eHjsEJXuwp5fusUooFoaKV1eaXf6+tRdWIIFQu/7LSfS1LoFQ==",
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.49.tgz",
36
- "_shasum": "c189cdfb54d06fa7fe893cd22c935b730dbfe20d",
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.56",
49
- "@syncfusion/ej2-inputs": "~20.3.56",
50
- "@syncfusion/ej2-lists": "~20.3.56",
51
- "@syncfusion/ej2-popups": "~20.3.56"
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.56",
84
+ "version": "20.4.38",
85
85
  "sideEffects": false
86
86
  }
@@ -137,6 +137,9 @@ var CalendarBase = /** @class */ (function (_super) {
137
137
  'data-role': 'calendar'
138
138
  });
139
139
  }
140
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
141
+ this.enabled = false;
142
+ }
140
143
  this.createHeader();
141
144
  this.createContent();
142
145
  this.wireEvents();
@@ -286,9 +289,11 @@ var CalendarBase = /** @class */ (function (_super) {
286
289
  else {
287
290
  cldrObj = (this.getCultureObjects(cldrData, '' + this.locale));
288
291
  }
289
- for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
290
- var obj = _a[_i];
291
- 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
+ }
292
297
  }
293
298
  return culShortNames;
294
299
  };
@@ -322,9 +327,11 @@ var CalendarBase = /** @class */ (function (_super) {
322
327
  }
323
328
  }
324
329
  // eslint-disable-next-line max-len
325
- var shortNames = this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek);
326
- for (var days = 0; days <= daysCount; days++) {
327
- 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
+ }
328
335
  }
329
336
  html = '<tr>' + html + '</tr>';
330
337
  this.tableHeadElement.innerHTML = html;
@@ -506,7 +513,7 @@ var CalendarBase = /** @class */ (function (_super) {
506
513
  e.preventDefault();
507
514
  break;
508
515
  case 'controlDown':
509
- if (!isNullOrUndefined(focusedDate) || !isNullOrUndefined(selectedDate) && !levelRestrict) {
516
+ if (!isNullOrUndefined(focusedDate) && !levelRestrict || !isNullOrUndefined(selectedDate) && !levelRestrict) {
510
517
  this.contentClick(null, --view, (focusedDate || selectedDate), value);
511
518
  }
512
519
  e.preventDefault();
@@ -1131,9 +1138,6 @@ var CalendarBase = /** @class */ (function (_super) {
1131
1138
  case 0:
1132
1139
  detach(this.tableBodyElement);
1133
1140
  this.renderMonths(e, null, isCustomDate);
1134
- if (multiSelection && !isNullOrUndefined(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0])) {
1135
- this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);
1136
- }
1137
1141
  break;
1138
1142
  case 1:
1139
1143
  detach(this.tableBodyElement);
@@ -1439,7 +1443,9 @@ var CalendarBase = /** @class */ (function (_super) {
1439
1443
  }
1440
1444
  }
1441
1445
  if (this.getModuleName() === 'calendar' && this.element) {
1442
- EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
1446
+ if (!isNullOrUndefined(this.headerTitleElement)) {
1447
+ EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);
1448
+ }
1443
1449
  if (this.todayElement) {
1444
1450
  EventHandler.remove(this.todayElement, 'click', this.todayButtonClick);
1445
1451
  }
@@ -1457,6 +1463,17 @@ var CalendarBase = /** @class */ (function (_super) {
1457
1463
  if (this.element) {
1458
1464
  this.element.innerHTML = '';
1459
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;
1460
1477
  _super.prototype.destroy.call(this);
1461
1478
  };
1462
1479
  CalendarBase.prototype.title = function (e) {
@@ -1761,10 +1778,12 @@ var CalendarBase = /** @class */ (function (_super) {
1761
1778
  };
1762
1779
  CalendarBase.prototype.previousIconHandler = function (disabled) {
1763
1780
  if (disabled) {
1764
- EventHandler.remove(this.previousIcon, 'click', this.navigatePreviousHandler);
1765
- addClass([this.previousIcon], '' + DISABLED);
1766
- addClass([this.previousIcon], '' + OVERLAY);
1767
- 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
+ }
1768
1787
  }
1769
1788
  else {
1770
1789
  EventHandler.add(this.previousIcon, 'click', this.navigatePreviousHandler);
@@ -1787,10 +1806,12 @@ var CalendarBase = /** @class */ (function (_super) {
1787
1806
  };
1788
1807
  CalendarBase.prototype.nextIconHandler = function (disabled) {
1789
1808
  if (disabled) {
1790
- EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);
1791
- addClass([this.nextIcon], DISABLED);
1792
- addClass([this.nextIcon], OVERLAY);
1793
- 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
+ }
1794
1815
  }
1795
1816
  else {
1796
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
  }
@@ -102,6 +102,9 @@ var DatePicker = /** @class */ (function (_super) {
102
102
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
103
103
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
104
104
  }
105
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
106
+ this.enabled = false;
107
+ }
105
108
  this.renderComplete();
106
109
  this.setTimeZone(this.serverTimezoneOffset);
107
110
  };
@@ -447,7 +450,9 @@ var DatePicker = /** @class */ (function (_super) {
447
450
  }
448
451
  };
449
452
  DatePicker.prototype.unBindEvents = function () {
450
- 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
+ }
451
456
  EventHandler.remove(this.inputElement, 'mouseup', this.mouseUpHandler);
452
457
  EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);
453
458
  EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);
@@ -579,10 +584,10 @@ var DatePicker = /** @class */ (function (_super) {
579
584
  if (!isNullOrUndefined(this.htmlAttributes)) {
580
585
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
581
586
  var key = _a[_i];
582
- if (!isNullOrUndefined(this.htmlAttributes[key])) {
587
+ if (!isNullOrUndefined(this.htmlAttributes["" + key])) {
583
588
  if (containerAttr.indexOf(key) > -1) {
584
589
  if (key === 'class') {
585
- var updatedClassValues = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
590
+ var updatedClassValues = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
586
591
  if (updatedClassValues !== '') {
587
592
  addClass([this.inputWrapper.container], updatedClassValues.split(' '));
588
593
  }
@@ -591,19 +596,19 @@ var DatePicker = /** @class */ (function (_super) {
591
596
  var setStyle = this.inputWrapper.container.getAttribute(key);
592
597
  if (!isNullOrUndefined(setStyle)) {
593
598
  if (setStyle.charAt(setStyle.length - 1) === ';') {
594
- setStyle = setStyle + this.htmlAttributes[key];
599
+ setStyle = setStyle + this.htmlAttributes["" + key];
595
600
  }
596
601
  else {
597
- setStyle = setStyle + ';' + this.htmlAttributes[key];
602
+ setStyle = setStyle + ';' + this.htmlAttributes["" + key];
598
603
  }
599
604
  }
600
605
  else {
601
- setStyle = this.htmlAttributes[key];
606
+ setStyle = this.htmlAttributes["" + key];
602
607
  }
603
608
  this.inputWrapper.container.setAttribute(key, setStyle);
604
609
  }
605
610
  else {
606
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
611
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
607
612
  }
608
613
  }
609
614
  }
@@ -615,7 +620,7 @@ var DatePicker = /** @class */ (function (_super) {
615
620
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
616
621
  var key = _a[_i];
617
622
  if (containerAttr.indexOf(key) < 0) {
618
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
623
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
619
624
  }
620
625
  }
621
626
  }
@@ -727,12 +732,12 @@ var DatePicker = /** @class */ (function (_super) {
727
732
  this.isPopupClicked = false;
728
733
  };
729
734
  DatePicker.prototype.documentHandler = function (e) {
730
- 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' ||
731
736
  (this.popupObj.element && this.popupObj.element.contains(e.target)))) && e.type !== 'touchstart') {
732
737
  e.preventDefault();
733
738
  }
734
739
  var target = e.target;
735
- if (!(closest(target, '.e-datepicker.e-popup-wrapper'))
740
+ if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
736
741
  && !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
737
742
  && (!target.classList.contains('e-day'))) {
738
743
  this.hide(e);
@@ -896,7 +901,7 @@ var DatePicker = /** @class */ (function (_super) {
896
901
  }
897
902
  if ((this.getModuleName() === 'datetimepicker')) {
898
903
  if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {
899
- date = this.globalize.parseDate(this.inputElement.value, dateOptions);
904
+ date = this.globalize.parseDate(this.inputElement.value.toLocaleUpperCase(), dateOptions);
900
905
  }
901
906
  else {
902
907
  if (this.calendarMode === 'Gregorian') {
@@ -1371,7 +1376,9 @@ var DatePicker = /** @class */ (function (_super) {
1371
1376
  DatePicker.prototype.destroy = function () {
1372
1377
  this.unBindEvents();
1373
1378
  _super.prototype.destroy.call(this);
1374
- this.keyboardModules.destroy();
1379
+ if (!isNullOrUndefined(this.keyboardModules)) {
1380
+ this.keyboardModules.destroy();
1381
+ }
1375
1382
  if (this.popupObj && this.popupObj.element.classList.contains(POPUP)) {
1376
1383
  _super.prototype.destroy.call(this);
1377
1384
  }
@@ -1401,15 +1408,21 @@ var DatePicker = /** @class */ (function (_super) {
1401
1408
  }
1402
1409
  if (this.ngTag === null) {
1403
1410
  if (this.inputElement) {
1404
- this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
1411
+ if (!isNullOrUndefined(this.inputWrapper)) {
1412
+ this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);
1413
+ }
1405
1414
  removeClass([this.inputElement], [INPUTROOT]);
1406
1415
  }
1407
1416
  removeClass([this.element], [ROOT]);
1408
- detach(this.inputWrapper.container);
1417
+ if (!isNullOrUndefined(this.inputWrapper)) {
1418
+ detach(this.inputWrapper.container);
1419
+ }
1409
1420
  }
1410
1421
  if (this.formElement) {
1411
1422
  EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
1412
1423
  }
1424
+ this.inputWrapper = null;
1425
+ this.keyboardModules = null;
1413
1426
  };
1414
1427
  DatePicker.prototype.ensureInputAttribute = function () {
1415
1428
  var prop = [];
@@ -1867,7 +1880,7 @@ var DatePicker = /** @class */ (function (_super) {
1867
1880
  }
1868
1881
  break;
1869
1882
  }
1870
- if (!this.isDynamicValueChanged && !this.isIconClicked) {
1883
+ if (!this.isDynamicValueChanged) {
1871
1884
  this.hide(null);
1872
1885
  }
1873
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
  }
@@ -170,6 +169,9 @@ var DateRangePicker = /** @class */ (function (_super) {
170
169
  if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {
171
170
  this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
172
171
  }
172
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
173
+ this.enabled = false;
174
+ }
173
175
  this.renderComplete();
174
176
  };
175
177
  /**
@@ -378,8 +380,8 @@ var DateRangePicker = /** @class */ (function (_super) {
378
380
  for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) {
379
381
  var pro = _a[_i];
380
382
  if (pro.indexOf('data') === 0) {
381
- this.firstHiddenChild.setAttribute(pro, attributes[pro]);
382
- this.secondHiddenChild.setAttribute(pro, attributes[pro]);
383
+ this.firstHiddenChild.setAttribute(pro, attributes["" + pro]);
384
+ this.secondHiddenChild.setAttribute(pro, attributes["" + pro]);
383
385
  }
384
386
  }
385
387
  };
@@ -427,19 +429,19 @@ var DateRangePicker = /** @class */ (function (_super) {
427
429
  var key = _a[_i];
428
430
  if (wrapperAttr.indexOf(key) > -1) {
429
431
  if (key === 'class') {
430
- var updatedClassValue = (this.htmlAttributes[key].replace(/\s+/g, ' ')).trim();
432
+ var updatedClassValue = (this.htmlAttributes["" + key].replace(/\s+/g, ' ')).trim();
431
433
  if (updatedClassValue !== '') {
432
434
  addClass([this.inputWrapper.container], updatedClassValue.split(' '));
433
435
  }
434
436
  }
435
437
  else if (key === 'style') {
436
438
  var dateRangeStyle = this.inputWrapper.container.getAttribute(key);
437
- dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes[key]) :
438
- this.htmlAttributes[key];
439
+ dateRangeStyle = !isNullOrUndefined(dateRangeStyle) ? (dateRangeStyle + this.htmlAttributes["" + key]) :
440
+ this.htmlAttributes["" + key];
439
441
  this.inputWrapper.container.setAttribute(key, dateRangeStyle);
440
442
  }
441
443
  else {
442
- this.inputWrapper.container.setAttribute(key, this.htmlAttributes[key]);
444
+ this.inputWrapper.container.setAttribute(key, this.htmlAttributes["" + key]);
443
445
  }
444
446
  }
445
447
  }
@@ -450,7 +452,7 @@ var DateRangePicker = /** @class */ (function (_super) {
450
452
  for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
451
453
  var key = _a[_i];
452
454
  if (wrapperAttr.indexOf(key) < 0) {
453
- this.inputElement.setAttribute(key, this.htmlAttributes[key]);
455
+ this.inputElement.setAttribute(key, this.htmlAttributes["" + key]);
454
456
  }
455
457
  }
456
458
  }
@@ -1176,10 +1178,8 @@ var DateRangePicker = /** @class */ (function (_super) {
1176
1178
  case 'tab':
1177
1179
  if (this.tabKeyValidation(ele, LEFTCALENDER)) {
1178
1180
  ele = this.keyCalendarUpdate(false, ele, false);
1179
- var focusedCell = ele.querySelector('.e-focused-date');
1180
- if (isNullOrUndefined(focusedCell)) {
1181
- this.currentDate = this.firstCellToFocus(this.rightCalendar);
1182
- }
1181
+ this.currentDate = this.firstCellToFocus(this.rightCalendar);
1182
+ view = this.getViewNumber(this.currentView());
1183
1183
  this.keyboardNavigate(0, view, e, max, min);
1184
1184
  this.keyNavigation(ele, e);
1185
1185
  }
@@ -1187,10 +1187,7 @@ var DateRangePicker = /** @class */ (function (_super) {
1187
1187
  case 'shiftTab':
1188
1188
  if (this.tabKeyValidation(ele, RIGHTCALENDER)) {
1189
1189
  ele = this.keyCalendarUpdate(true, ele, false);
1190
- var focusedCell = ele.querySelector('.e-focused-date');
1191
- if (isNullOrUndefined(focusedCell)) {
1192
- this.currentDate = this.firstCellToFocus(this.leftCalendar);
1193
- }
1190
+ this.currentDate = this.firstCellToFocus(this.leftCalendar);
1194
1191
  this.keyboardNavigate(0, view, e, max, min);
1195
1192
  this.keyNavigation(ele, e);
1196
1193
  }
@@ -1198,7 +1195,7 @@ var DateRangePicker = /** @class */ (function (_super) {
1198
1195
  }
1199
1196
  };
1200
1197
  DateRangePicker.prototype.firstCellToFocus = function (calendar) {
1201
- 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)');
1202
1199
  var focusEleID = focusAbleEle && focusAbleEle.id ? focusAbleEle.id.split('_')[0] : null;
1203
1200
  var currentFirstDay = new Date(this.currentDate.getFullYear(), this.currentDate.getMonth(), 1);
1204
1201
  var focusDate = focusEleID ? new Date(+focusEleID) : currentFirstDay;
@@ -1425,7 +1422,11 @@ var DateRangePicker = /** @class */ (function (_super) {
1425
1422
  var leftHeader = this.leftCalendar.querySelector('.e-header');
1426
1423
  var isRightMonth = rightHeader ? rightHeader.classList.contains('e-month') : false;
1427
1424
  var isLeftMonth = leftHeader ? leftHeader.classList.contains('e-month') : false;
1428
- 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;
1429
1430
  };
1430
1431
  DateRangePicker.prototype.keyNavigation = function (calendar, e) {
1431
1432
  this.bindCalendarCellEvents(calendar);
@@ -3802,6 +3803,30 @@ var DateRangePicker = /** @class */ (function (_super) {
3802
3803
  this.inputElement.setAttribute('name', this.element.getAttribute('data-name'));
3803
3804
  this.inputElement.removeAttribute('data-name');
3804
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;
3805
3830
  };
3806
3831
  DateRangePicker.prototype.ensureInputAttribute = function () {
3807
3832
  var attr = [];
@@ -4117,6 +4142,9 @@ var DateRangePicker = /** @class */ (function (_super) {
4117
4142
  for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
4118
4143
  var prop = _a[_i];
4119
4144
  var openPopup = ['maxDays', 'minDays', 'value'];
4145
+ if (openPopup.indexOf(prop) < 0) {
4146
+ this.hide(null);
4147
+ }
4120
4148
  switch (prop) {
4121
4149
  case 'width':
4122
4150
  this.setEleWidth(this.width);
@@ -4326,13 +4354,7 @@ var DateRangePicker = /** @class */ (function (_super) {
4326
4354
  this.setProperties({ depth: newProp.depth }, true);
4327
4355
  this.refreshChange();
4328
4356
  break;
4329
- default:
4330
- this.isPropChanged = true;
4331
- }
4332
- if (openPopup.indexOf(prop) < 0 && !this.isPropChanged) {
4333
- this.hide(null);
4334
4357
  }
4335
- this.isPropChanged = false;
4336
4358
  }
4337
4359
  };
4338
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
  /**
@@ -190,6 +198,9 @@ var DateTimePicker = /** @class */ (function (_super) {
190
198
  this.cloneElement = this.element.cloneNode(true);
191
199
  this.dateTimeFormat = this.cldrDateTimeFormat();
192
200
  this.initValue = this.value;
201
+ if (!isNullOrUndefined(closest(this.element, "fieldset")) && closest(this.element, "fieldset").disabled) {
202
+ this.enabled = false;
203
+ }
193
204
  _super.prototype.updateHtmlAttributeToElement.call(this);
194
205
  this.checkAttributes(false);
195
206
  var localeText = { placeholder: this.placeholder };
@@ -579,7 +590,7 @@ var DateTimePicker = /** @class */ (function (_super) {
579
590
  event.preventDefault();
580
591
  }
581
592
  if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
582
- && target !== this.timeIcon && target !== this.inputWrapper.container) {
593
+ && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
583
594
  if (this.isTimePopupOpen()) {
584
595
  this.hide(event);
585
596
  this.focusOut();
@@ -1457,7 +1468,7 @@ var DateTimePicker = /** @class */ (function (_super) {
1457
1468
  _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
1458
1469
  break;
1459
1470
  }
1460
- if (!this.isDynamicValueChanged && !this.isIconClicked) {
1471
+ if (!this.isDynamicValueChanged) {
1461
1472
  this.hide(null);
1462
1473
  }
1463
1474
  this.isDynamicValueChanged = false;