@syncfusion/ej2-calendars 20.4.44 → 20.4.51
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.
- package/CHANGELOG.md +12 -0
- package/GitLeaksReport.json +1 -0
- package/dist/ej2-calendars.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js +2 -2
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +26 -19
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +28 -19
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +2 -2
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/package.json +10 -10
- package/src/calendar/calendar.js +1 -1
- package/src/datepicker/datepicker.js +18 -10
- package/src/daterangepicker/daterangepicker.js +4 -4
- package/src/datetimepicker/datetimepicker.js +5 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.4.
|
|
3
|
+
* version : 20.4.51
|
|
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
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-calendars@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-calendars@20.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@20.4.48",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-Mo7eEO+t4dyeK6ga6RoGSu7mMaybao+tnPiEOw81sYTDS5USjrC8fsMuZ4W5Pd/TVQWQCscMTrblPv+ccDWFJg==",
|
|
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.
|
|
36
|
-
"_shasum": "
|
|
35
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-20.4.48.tgz",
|
|
36
|
+
"_shasum": "992f7575ee30864d5aa80cea1ca9b5093e823610",
|
|
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.
|
|
48
|
-
"@syncfusion/ej2-buttons": "~20.4.
|
|
49
|
-
"@syncfusion/ej2-inputs": "~20.4.
|
|
50
|
-
"@syncfusion/ej2-lists": "~20.4.
|
|
51
|
-
"@syncfusion/ej2-popups": "~20.4.
|
|
47
|
+
"@syncfusion/ej2-base": "~20.4.51",
|
|
48
|
+
"@syncfusion/ej2-buttons": "~20.4.50",
|
|
49
|
+
"@syncfusion/ej2-inputs": "~20.4.51",
|
|
50
|
+
"@syncfusion/ej2-lists": "~20.4.50",
|
|
51
|
+
"@syncfusion/ej2-popups": "~20.4.51"
|
|
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.
|
|
84
|
+
"version": "20.4.51",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
package/src/calendar/calendar.js
CHANGED
|
@@ -2570,7 +2570,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
2570
2570
|
if (!isNullOrUndefined(this.value)) {
|
|
2571
2571
|
this.setProperties({ value: this.value }, true);
|
|
2572
2572
|
}
|
|
2573
|
-
if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) && !isNullOrUndefined(this.previousDate)
|
|
2573
|
+
if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) && !isNullOrUndefined(this.previousDate) || this.previousDate == null
|
|
2574
2574
|
&& !isNaN(+this.value))) {
|
|
2575
2575
|
this.changeEvent(e);
|
|
2576
2576
|
}
|
|
@@ -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()
|
|
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);
|
|
@@ -1085,8 +1085,10 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1085
1085
|
this.trigger('navigated', this.navigatedArgs);
|
|
1086
1086
|
};
|
|
1087
1087
|
DatePicker.prototype.changeEvent = function (event) {
|
|
1088
|
-
if (
|
|
1088
|
+
if (!this.isIconClicked) {
|
|
1089
1089
|
this.selectCalendar(event);
|
|
1090
|
+
}
|
|
1091
|
+
if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {
|
|
1090
1092
|
this.changedArgs.event = event ? event : null;
|
|
1091
1093
|
this.changedArgs.element = this.element;
|
|
1092
1094
|
this.changedArgs.isInteracted = this.isInteracted;
|
|
@@ -1100,6 +1102,9 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1100
1102
|
this.previousElementValue = this.inputElement.value;
|
|
1101
1103
|
this.errorClass();
|
|
1102
1104
|
}
|
|
1105
|
+
else if (event) {
|
|
1106
|
+
this.hide(event);
|
|
1107
|
+
}
|
|
1103
1108
|
};
|
|
1104
1109
|
DatePicker.prototype.requiredModules = function () {
|
|
1105
1110
|
var modules = [];
|
|
@@ -1188,7 +1193,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1188
1193
|
else {
|
|
1189
1194
|
var prevent_1 = true;
|
|
1190
1195
|
var outOfRange = void 0;
|
|
1191
|
-
if (!isNullOrUndefined(this.value) && !(+this.value >= +this.min && +this.value <= +this.max)) {
|
|
1196
|
+
if (!isNullOrUndefined(this.value) && !(+this.value >= +new Date(this.checkValue(this.min)) && +this.value <= +new Date(this.checkValue(this.max)))) {
|
|
1192
1197
|
outOfRange = new Date(this.checkValue(this.value));
|
|
1193
1198
|
this.setProperties({ 'value': null }, true);
|
|
1194
1199
|
}
|
|
@@ -1654,14 +1659,17 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1654
1659
|
DatePicker.prototype.getModuleName = function () {
|
|
1655
1660
|
return 'datepicker';
|
|
1656
1661
|
};
|
|
1657
|
-
DatePicker.prototype.disabledDates = function () {
|
|
1662
|
+
DatePicker.prototype.disabledDates = function (isDynamic) {
|
|
1663
|
+
if (isDynamic === void 0) { isDynamic = false; }
|
|
1658
1664
|
var formatOptions;
|
|
1659
1665
|
var globalize;
|
|
1660
1666
|
var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));
|
|
1661
1667
|
var previousValCopy = this.previousDate;
|
|
1662
1668
|
//calls the Calendar render method to check the disabled dates through renderDayCell event and update the input value accordingly.
|
|
1663
1669
|
this.minMaxUpdates();
|
|
1664
|
-
|
|
1670
|
+
if (!isDynamic || (isDynamic && !isNullOrUndefined(this.renderDayCell))) {
|
|
1671
|
+
_super.prototype.render.call(this);
|
|
1672
|
+
}
|
|
1665
1673
|
this.previousDate = previousValCopy;
|
|
1666
1674
|
var date = valueCopy && +(valueCopy);
|
|
1667
1675
|
var dateIdString = '*[id^="/id"]'.replace('/id', '' + date);
|
|
@@ -1670,7 +1678,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1670
1678
|
this.setProperties({ value: valueCopy }, true);
|
|
1671
1679
|
}
|
|
1672
1680
|
}
|
|
1673
|
-
if (!isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0])) {
|
|
1681
|
+
if (!isNullOrUndefined(this.calendarElement) && !isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0])) {
|
|
1674
1682
|
if (this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled')) {
|
|
1675
1683
|
if (!this.strictMode) {
|
|
1676
1684
|
this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));
|
|
@@ -1731,8 +1739,8 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1731
1739
|
var isDisabledDate = this.calendarElement &&
|
|
1732
1740
|
this.calendarElement.querySelectorAll(dateIdString)[0] &&
|
|
1733
1741
|
this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');
|
|
1734
|
-
if ((!isNullOrUndefined(this.value) && !(
|
|
1735
|
-
&&
|
|
1742
|
+
if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) && !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)
|
|
1743
|
+
&& new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))
|
|
1736
1744
|
|| (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {
|
|
1737
1745
|
addClass([this.inputWrapper.container], ERROR);
|
|
1738
1746
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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;
|
|
@@ -716,8 +717,8 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
|
716
717
|
return popupHeight > height ? height : popupHeight;
|
|
717
718
|
};
|
|
718
719
|
DateTimePicker.prototype.changeEvent = function (e) {
|
|
720
|
+
_super.prototype.changeEvent.call(this, e);
|
|
719
721
|
if ((this.value && this.value.valueOf()) !== (this.previousDateTime && +this.previousDateTime.valueOf())) {
|
|
720
|
-
_super.prototype.changeEvent.call(this, e);
|
|
721
722
|
this.valueWithMinutes = this.value;
|
|
722
723
|
this.setInputValue('date');
|
|
723
724
|
this.previousDateTime = this.value && new Date(+this.value);
|