@syncfusion/ej2-calendars 20.4.44 → 20.4.48

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.4.44
3
+ * version : 20.4.48
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.4.42",
3
+ "_id": "@syncfusion/ej2-calendars@20.4.44",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-6kl8AIUSw6CdTxJ9PICwOgUr4fBrox9dXYTx/j+kDC0+m4cZfOCPRNs3/3sz2Oaeo+tIv/35b4P0G/EtzHmZgA==",
5
+ "_integrity": "sha512-lPyLD/lhi38bHc+9j4Gxo3NT8UHOVrdv/Ia9Ta7wDIHKjp2Wgm1TO/yUOatKJ99F8H24jtdqhVyvrOU1NjjWTw==",
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.4.42.tgz",
36
- "_shasum": "6ac546f7c01e2909f4d499b1ba15ae46a38241cd",
35
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-20.4.44.tgz",
36
+ "_shasum": "edb94ca0fd4fb86a6c64accd05e956ad9761afd2",
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.4.44",
48
- "@syncfusion/ej2-buttons": "~20.4.44",
49
- "@syncfusion/ej2-inputs": "~20.4.42",
50
- "@syncfusion/ej2-lists": "~20.4.42",
51
- "@syncfusion/ej2-popups": "~20.4.44"
47
+ "@syncfusion/ej2-base": "~20.4.48",
48
+ "@syncfusion/ej2-buttons": "~20.4.48",
49
+ "@syncfusion/ej2-inputs": "~20.4.48",
50
+ "@syncfusion/ej2-lists": "~20.4.48",
51
+ "@syncfusion/ej2-popups": "~20.4.48"
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.4.44",
84
+ "version": "20.4.48",
85
85
  "sideEffects": false
86
86
  }
@@ -157,7 +157,7 @@ var DatePicker = /** @class */ (function (_super) {
157
157
  this.createInput();
158
158
  this.updateHtmlAttributeToWrapper();
159
159
  this.setAllowEdit();
160
- this.updateInput();
160
+ this.updateInput(true);
161
161
  if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType == 'Always' || !this.floatLabelType || !this.placeholder)) {
162
162
  this.updateInputValue(this.maskedDateValue);
163
163
  }
@@ -219,8 +219,8 @@ var DatePicker = /** @class */ (function (_super) {
219
219
  DatePicker.prototype.updateInput = function (isDynamic) {
220
220
  if (isDynamic === void 0) { isDynamic = false; }
221
221
  var formatOptions;
222
- if (this.value && !this.isCalendar() && !isDynamic) {
223
- this.disabledDates();
222
+ if (this.value && !this.isCalendar()) {
223
+ this.disabledDates(isDynamic);
224
224
  }
225
225
  if (isNaN(+new Date(this.checkValue(this.value)))) {
226
226
  this.setProperties({ value: null }, true);
@@ -1654,14 +1654,17 @@ var DatePicker = /** @class */ (function (_super) {
1654
1654
  DatePicker.prototype.getModuleName = function () {
1655
1655
  return 'datepicker';
1656
1656
  };
1657
- DatePicker.prototype.disabledDates = function () {
1657
+ DatePicker.prototype.disabledDates = function (isDynamic) {
1658
+ if (isDynamic === void 0) { isDynamic = false; }
1658
1659
  var formatOptions;
1659
1660
  var globalize;
1660
1661
  var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
1661
1662
  var previousValCopy = this.previousDate;
1662
1663
  //calls the Calendar render method to check the disabled dates through renderDayCell event and update the input value accordingly.
1663
1664
  this.minMaxUpdates();
1664
- _super.prototype.render.call(this);
1665
+ if (!isDynamic || (isDynamic && !isNullOrUndefined(this.renderDayCell))) {
1666
+ _super.prototype.render.call(this);
1667
+ }
1665
1668
  this.previousDate = previousValCopy;
1666
1669
  var date = valueCopy && +(valueCopy);
1667
1670
  var dateIdString = '*[id^="/id"]'.replace('/id', '' + date);
@@ -1670,7 +1673,7 @@ var DatePicker = /** @class */ (function (_super) {
1670
1673
  this.setProperties({ value: valueCopy }, true);
1671
1674
  }
1672
1675
  }
1673
- if (!isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0])) {
1676
+ if (!isNullOrUndefined(this.calendarElement) && !isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0])) {
1674
1677
  if (this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled')) {
1675
1678
  if (!this.strictMode) {
1676
1679
  this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
@@ -1731,8 +1734,8 @@ var DatePicker = /** @class */ (function (_super) {
1731
1734
  var isDisabledDate = this.calendarElement &&
1732
1735
  this.calendarElement.querySelectorAll(dateIdString)[0] &&
1733
1736
  this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
1734
- if ((!isNullOrUndefined(this.value) && !(+new Date(+this.value).setMilliseconds(0) >= +this.min
1735
- && +new Date(+this.value).setMilliseconds(0) <= +this.max))
1737
+ if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) && !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
1738
+ && new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
1736
1739
  || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
1737
1740
  addClass([this.inputWrapper.container], ERROR);
1738
1741
  attributes(this.inputElement, { 'aria-invalid': 'true' });
@@ -804,7 +804,7 @@ var DateRangePicker = /** @class */ (function (_super) {
804
804
  this.createControl();
805
805
  this.bindCalendarEvents();
806
806
  this.updateRange((this.isMobile ? [this.calendarElement] : [this.leftCalendar, this.rightCalendar]));
807
- if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.renderDayCell)) {
807
+ if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
808
808
  this.disabledDateRender();
809
809
  }
810
810
  this.updateHeader();
@@ -1821,7 +1821,7 @@ var DateRangePicker = /** @class */ (function (_super) {
1821
1821
  if (!this.isMobile) {
1822
1822
  this.removeClassDisabled();
1823
1823
  }
1824
- if (!isNullOrUndefined(this.renderDayCell)) {
1824
+ if (!isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
1825
1825
  this.disabledDateRender();
1826
1826
  }
1827
1827
  this.trigger('select', this.rangeArgs(event));
@@ -3399,7 +3399,7 @@ var DateRangePicker = /** @class */ (function (_super) {
3399
3399
  if (!this.strictMode && (isDisabled)) {
3400
3400
  this.clearRange();
3401
3401
  }
3402
- if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isDisabled && !isNullOrUndefined(this.renderDayCell)) {
3402
+ if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isDisabled && !isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
3403
3403
  this.disabledDateRender();
3404
3404
  }
3405
3405
  this.errorClass();
@@ -3892,7 +3892,7 @@ var DateRangePicker = /** @class */ (function (_super) {
3892
3892
  if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
3893
3893
  range = (Math.round(Math.abs((this.removeTimeValueFromDate(this.startValue).getTime() -
3894
3894
  this.removeTimeValueFromDate(this.endValue).getTime()) / (1000 * 60 * 60 * 24))) + 1);
3895
- if (!isNullOrUndefined(this.renderDayCell)) {
3895
+ if (!isNullOrUndefined(this.renderDayCellArgs) && this.renderDayCellArgs.isDisabled) {
3896
3896
  this.disabledDateRender();
3897
3897
  }
3898
3898
  if (!isNullOrUndefined(this.disabledDayCnt)) {
@@ -215,7 +215,7 @@ var DateTimePicker = /** @class */ (function (_super) {
215
215
  module: "MaskedDateTime",
216
216
  });
217
217
  }
218
- this.setValue();
218
+ this.setValue(true);
219
219
  if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType == 'Always' || !this.floatLabelType || !this.placeholder)) {
220
220
  Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);
221
221
  }
@@ -234,7 +234,8 @@ var DateTimePicker = /** @class */ (function (_super) {
234
234
  }
235
235
  this.renderComplete();
236
236
  };
237
- DateTimePicker.prototype.setValue = function () {
237
+ DateTimePicker.prototype.setValue = function (isDynamic) {
238
+ if (isDynamic === void 0) { isDynamic = false; }
238
239
  this.initValue = this.validateMinMaxRange(this.value);
239
240
  if (!this.strictMode && this.isDateObject(this.initValue)) {
240
241
  var value = this.validateMinMaxRange(this.initValue);
@@ -248,7 +249,7 @@ var DateTimePicker = /** @class */ (function (_super) {
248
249
  }
249
250
  }
250
251
  this.valueWithMinutes = this.value;
251
- _super.prototype.updateInput.call(this);
252
+ _super.prototype.updateInput.call(this, isDynamic);
252
253
  };
253
254
  DateTimePicker.prototype.validateMinMaxRange = function (value) {
254
255
  var result = value;