@syncfusion/ej2-calendars 20.4.42 → 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/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 +28 -4
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +28 -4
- 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 +8 -8
- package/src/daterangepicker/daterangepicker.d.ts +2 -0
- package/src/daterangepicker/daterangepicker.js +28 -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.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@20.4.
|
|
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-20.4.
|
|
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.
|
|
47
|
+
"@syncfusion/ej2-base": "~20.4.44",
|
|
48
|
+
"@syncfusion/ej2-buttons": "~20.4.44",
|
|
49
49
|
"@syncfusion/ej2-inputs": "~20.4.42",
|
|
50
50
|
"@syncfusion/ej2-lists": "~20.4.42",
|
|
51
|
-
"@syncfusion/ej2-popups": "~20.4.
|
|
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
|
*
|
|
@@ -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;
|
|
@@ -4133,6 +4146,17 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4133
4146
|
this.updateHeader();
|
|
4134
4147
|
}
|
|
4135
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
|
+
};
|
|
4136
4160
|
/**
|
|
4137
4161
|
* Called internally if any of the property value changed.
|
|
4138
4162
|
*
|
|
@@ -4222,7 +4246,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4222
4246
|
newProp.startDate = this.globalize.parseDate(newProp.startDate, format);
|
|
4223
4247
|
}
|
|
4224
4248
|
if (+this.initStartDate !== +newProp.startDate) {
|
|
4225
|
-
this.startValue = this.
|
|
4249
|
+
this.startValue = this.getStartEndValue(newProp.startDate, false);
|
|
4226
4250
|
this.setDate();
|
|
4227
4251
|
this.setValue();
|
|
4228
4252
|
}
|
|
@@ -4232,7 +4256,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4232
4256
|
newProp.endDate = this.globalize.parseDate(newProp.endDate, format);
|
|
4233
4257
|
}
|
|
4234
4258
|
if (+this.initEndDate !== +newProp.endDate) {
|
|
4235
|
-
this.endValue = this.
|
|
4259
|
+
this.endValue = this.getStartEndValue(newProp.endDate, true);
|
|
4236
4260
|
this.setDate();
|
|
4237
4261
|
this.setValue();
|
|
4238
4262
|
}
|