@syncfusion/ej2-calendars 20.4.40 → 20.4.44
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/README.md +1 -1
- 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 +36 -8
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +36 -8
- 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/package.json +10 -10
- package/src/daterangepicker/daterangepicker.d.ts +2 -0
- package/src/daterangepicker/daterangepicker.js +36 -8
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.44
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@20.4.42",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-6kl8AIUSw6CdTxJ9PICwOgUr4fBrox9dXYTx/j+kDC0+m4cZfOCPRNs3/3sz2Oaeo+tIv/35b4P0G/EtzHmZgA==",
|
|
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-
|
|
36
|
-
"_shasum": "
|
|
35
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-20.4.42.tgz",
|
|
36
|
+
"_shasum": "6ac546f7c01e2909f4d499b1ba15ae46a38241cd",
|
|
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.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"
|
|
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.44",
|
|
85
85
|
"sideEffects": false
|
|
86
86
|
}
|
|
@@ -638,6 +638,7 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
638
638
|
private deviceHeaderClick;
|
|
639
639
|
private inputFocusHandler;
|
|
640
640
|
private inputBlurHandler;
|
|
641
|
+
private getStartEndDate;
|
|
641
642
|
private clearRange;
|
|
642
643
|
private errorClass;
|
|
643
644
|
private keyCalendarUpdate;
|
|
@@ -820,6 +821,7 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
820
821
|
private clearModelvalue;
|
|
821
822
|
private createHiddenInput;
|
|
822
823
|
private setMinMaxDays;
|
|
824
|
+
private getStartEndValue;
|
|
823
825
|
/**
|
|
824
826
|
* Called internally if any of the property value changed.
|
|
825
827
|
*
|
|
@@ -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)) {
|
|
807
|
+
if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.renderDayCell)) {
|
|
808
808
|
this.disabledDateRender();
|
|
809
809
|
}
|
|
810
810
|
this.updateHeader();
|
|
@@ -975,8 +975,10 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
975
975
|
if (range.length > 1) {
|
|
976
976
|
this.invalidValueString = null;
|
|
977
977
|
var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
978
|
-
var
|
|
979
|
-
var
|
|
978
|
+
var start = new Date(range[0]);
|
|
979
|
+
var end = new Date(range[1]);
|
|
980
|
+
var startDate = this.getStartEndDate(start, false, range, dateOptions);
|
|
981
|
+
var endDate = this.getStartEndDate(end, true, range, dateOptions);
|
|
980
982
|
if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
|
|
981
983
|
var prevStartVal = this.startValue;
|
|
982
984
|
this.startValue = startDate;
|
|
@@ -1048,6 +1050,17 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1048
1050
|
}
|
|
1049
1051
|
this.updateHiddenInput();
|
|
1050
1052
|
};
|
|
1053
|
+
DateRangePicker.prototype.getStartEndDate = function (date, isEnd, range, dateOptions) {
|
|
1054
|
+
if (this.depth === 'Month') {
|
|
1055
|
+
return this.globalize.parseDate(range[isEnd ? 1 : 0].trim(), dateOptions);
|
|
1056
|
+
}
|
|
1057
|
+
else if (this.depth === 'Year') {
|
|
1058
|
+
return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1051
1064
|
DateRangePicker.prototype.clearRange = function () {
|
|
1052
1065
|
this.previousStartValue = this.previousEndValue = null;
|
|
1053
1066
|
this.currentDate = null;
|
|
@@ -1808,7 +1821,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1808
1821
|
if (!this.isMobile) {
|
|
1809
1822
|
this.removeClassDisabled();
|
|
1810
1823
|
}
|
|
1811
|
-
this.
|
|
1824
|
+
if (!isNullOrUndefined(this.renderDayCell)) {
|
|
1825
|
+
this.disabledDateRender();
|
|
1826
|
+
}
|
|
1812
1827
|
this.trigger('select', this.rangeArgs(event));
|
|
1813
1828
|
}
|
|
1814
1829
|
else if (+date < +this.startValue) {
|
|
@@ -3384,7 +3399,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3384
3399
|
if (!this.strictMode && (isDisabled)) {
|
|
3385
3400
|
this.clearRange();
|
|
3386
3401
|
}
|
|
3387
|
-
if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isDisabled) {
|
|
3402
|
+
if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue) && !isDisabled && !isNullOrUndefined(this.renderDayCell)) {
|
|
3388
3403
|
this.disabledDateRender();
|
|
3389
3404
|
}
|
|
3390
3405
|
this.errorClass();
|
|
@@ -3877,7 +3892,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3877
3892
|
if (!isNullOrUndefined(this.startValue) && !isNullOrUndefined(this.endValue)) {
|
|
3878
3893
|
range = (Math.round(Math.abs((this.removeTimeValueFromDate(this.startValue).getTime() -
|
|
3879
3894
|
this.removeTimeValueFromDate(this.endValue).getTime()) / (1000 * 60 * 60 * 24))) + 1);
|
|
3880
|
-
this.
|
|
3895
|
+
if (!isNullOrUndefined(this.renderDayCell)) {
|
|
3896
|
+
this.disabledDateRender();
|
|
3897
|
+
}
|
|
3881
3898
|
if (!isNullOrUndefined(this.disabledDayCnt)) {
|
|
3882
3899
|
range = range - this.disabledDayCnt;
|
|
3883
3900
|
this.disabledDayCnt = null;
|
|
@@ -4129,6 +4146,17 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4129
4146
|
this.updateHeader();
|
|
4130
4147
|
}
|
|
4131
4148
|
};
|
|
4149
|
+
DateRangePicker.prototype.getStartEndValue = function (date, isEnd) {
|
|
4150
|
+
if (this.depth === 'Month') {
|
|
4151
|
+
return this.checkDateValue(new Date(this.checkValue(date)));
|
|
4152
|
+
}
|
|
4153
|
+
else if (this.depth === 'Year') {
|
|
4154
|
+
return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
|
|
4155
|
+
}
|
|
4156
|
+
else {
|
|
4157
|
+
return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
|
|
4158
|
+
}
|
|
4159
|
+
};
|
|
4132
4160
|
/**
|
|
4133
4161
|
* Called internally if any of the property value changed.
|
|
4134
4162
|
*
|
|
@@ -4218,7 +4246,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4218
4246
|
newProp.startDate = this.globalize.parseDate(newProp.startDate, format);
|
|
4219
4247
|
}
|
|
4220
4248
|
if (+this.initStartDate !== +newProp.startDate) {
|
|
4221
|
-
this.startValue = this.
|
|
4249
|
+
this.startValue = this.getStartEndValue(newProp.startDate, false);
|
|
4222
4250
|
this.setDate();
|
|
4223
4251
|
this.setValue();
|
|
4224
4252
|
}
|
|
@@ -4228,7 +4256,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4228
4256
|
newProp.endDate = this.globalize.parseDate(newProp.endDate, format);
|
|
4229
4257
|
}
|
|
4230
4258
|
if (+this.initEndDate !== +newProp.endDate) {
|
|
4231
|
-
this.endValue = this.
|
|
4259
|
+
this.endValue = this.getStartEndValue(newProp.endDate, true);
|
|
4232
4260
|
this.setDate();
|
|
4233
4261
|
this.setValue();
|
|
4234
4262
|
}
|