@syncfusion/ej2-calendars 28.1.36 → 28.1.39
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 +10 -1
- package/dist/ej2-calendars.umd.min.js +10 -1
- package/dist/ej2-calendars.umd.min.js.map +1 -1
- package/dist/es6/ej2-calendars.es2015.js +39 -20
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +38 -19
- package/dist/es6/ej2-calendars.es5.js.map +1 -1
- package/dist/global/ej2-calendars.min.js +10 -1
- package/dist/global/ej2-calendars.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +11 -9
- package/src/daterangepicker/daterangepicker.js +38 -19
package/dist/global/index.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* filename: index.d.ts
|
|
3
|
+
* version : 28.1.39
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
|
5
|
+
* Use of this code is subject to the terms of our license.
|
|
6
|
+
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
+
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
+
* applicable laws.
|
|
9
|
+
*/
|
|
1
10
|
import * as _calendars from '@syncfusion/ej2-calendars';
|
|
2
11
|
|
|
3
12
|
export declare namespace ej {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-calendars@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-calendars@28.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-calendars@28.1.37",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-BEUDBPMzWc5cw7sRi8fPKfsdrJMV/bcWDUATiEyj755GsvoPPCvSypdy9iBZmfjYzTeJCchzy9XZu379tAgLrA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-calendars",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"_requiredBy": [
|
|
20
20
|
"/",
|
|
21
|
+
"/@syncfusion/ej2",
|
|
21
22
|
"/@syncfusion/ej2-angular-calendars",
|
|
22
23
|
"/@syncfusion/ej2-charts",
|
|
23
24
|
"/@syncfusion/ej2-documenteditor",
|
|
@@ -25,12 +26,13 @@
|
|
|
25
26
|
"/@syncfusion/ej2-grids",
|
|
26
27
|
"/@syncfusion/ej2-inplace-editor",
|
|
27
28
|
"/@syncfusion/ej2-pivotview",
|
|
29
|
+
"/@syncfusion/ej2-querybuilder",
|
|
28
30
|
"/@syncfusion/ej2-react-calendars",
|
|
29
31
|
"/@syncfusion/ej2-schedule",
|
|
30
32
|
"/@syncfusion/ej2-vue-calendars"
|
|
31
33
|
],
|
|
32
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-28.1.
|
|
33
|
-
"_shasum": "
|
|
34
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-28.1.37.tgz",
|
|
35
|
+
"_shasum": "d0c3c65c858162b7c1c8f84e38ecc9633428baf5",
|
|
34
36
|
"_spec": "@syncfusion/ej2-calendars@*",
|
|
35
37
|
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
|
|
36
38
|
"author": {
|
|
@@ -42,10 +44,10 @@
|
|
|
42
44
|
"bundleDependencies": false,
|
|
43
45
|
"dependencies": {
|
|
44
46
|
"@syncfusion/ej2-base": "~28.1.33",
|
|
45
|
-
"@syncfusion/ej2-buttons": "~28.1.
|
|
46
|
-
"@syncfusion/ej2-inputs": "~28.1.
|
|
47
|
-
"@syncfusion/ej2-lists": "~28.1.
|
|
48
|
-
"@syncfusion/ej2-popups": "~28.1.
|
|
47
|
+
"@syncfusion/ej2-buttons": "~28.1.39",
|
|
48
|
+
"@syncfusion/ej2-inputs": "~28.1.37",
|
|
49
|
+
"@syncfusion/ej2-lists": "~28.1.37",
|
|
50
|
+
"@syncfusion/ej2-popups": "~28.1.39"
|
|
49
51
|
},
|
|
50
52
|
"deprecated": false,
|
|
51
53
|
"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.",
|
|
@@ -78,6 +80,6 @@
|
|
|
78
80
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
79
81
|
},
|
|
80
82
|
"typings": "index.d.ts",
|
|
81
|
-
"version": "28.1.
|
|
83
|
+
"version": "28.1.39",
|
|
82
84
|
"sideEffects": false
|
|
83
85
|
}
|
|
@@ -980,10 +980,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
980
980
|
if (range.length > 1) {
|
|
981
981
|
this.invalidValueString = null;
|
|
982
982
|
var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
983
|
-
var
|
|
984
|
-
var
|
|
985
|
-
var startDate = this.getStartEndDate(start, false, range, dateOptions);
|
|
986
|
-
var endDate = this.getStartEndDate(end, true, range, dateOptions);
|
|
983
|
+
var startDate = this.globalize.parseDate(this.getAmPmValue(range[0]).trim(), dateOptions);
|
|
984
|
+
var endDate = this.globalize.parseDate(this.getAmPmValue(range[1]).trim(), dateOptions);
|
|
987
985
|
if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
|
|
988
986
|
var prevStartVal = this.startValue;
|
|
989
987
|
this.startValue = startDate;
|
|
@@ -1055,14 +1053,11 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1055
1053
|
}
|
|
1056
1054
|
this.updateHiddenInput();
|
|
1057
1055
|
};
|
|
1058
|
-
DateRangePicker.prototype.getStartEndDate = function (date, isEnd
|
|
1059
|
-
if (this.
|
|
1060
|
-
return this.globalize.parseDate(this.getAmPmValue(range[isEnd ? 1 : 0]).trim(), dateOptions);
|
|
1061
|
-
}
|
|
1062
|
-
else if (this.depth === 'Year' && !isNullOrUndefined(date)) {
|
|
1056
|
+
DateRangePicker.prototype.getStartEndDate = function (date, isEnd) {
|
|
1057
|
+
if (this.currentView() === 'Year' && !isNullOrUndefined(date)) {
|
|
1063
1058
|
return new Date(date.getFullYear(), date.getMonth() + (isEnd ? 1 : 0), isEnd ? 0 : 1);
|
|
1064
1059
|
}
|
|
1065
|
-
else if (!isNullOrUndefined(date)) {
|
|
1060
|
+
else if (this.currentView() === 'Decade' && !isNullOrUndefined(date)) {
|
|
1066
1061
|
return new Date(date.getFullYear(), isEnd ? 11 : 0, isEnd ? 31 : 1);
|
|
1067
1062
|
}
|
|
1068
1063
|
else {
|
|
@@ -1555,7 +1550,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1555
1550
|
var isDisabledCell = (!ele.classList.contains(DISABLED) || ele.classList.contains(DATEDISABLED));
|
|
1556
1551
|
if (!ele.classList.contains(WEEKNUMBER) && isDisabledCell) {
|
|
1557
1552
|
var eleDate = this.getIdValue(null, ele);
|
|
1558
|
-
var startDateValue = new Date(+this.startValue);
|
|
1553
|
+
var startDateValue = this.currentView() === 'Month' ? new Date(+this.startValue) : this.getStartEndDate(new Date(+this.startValue), false);
|
|
1559
1554
|
var eleDateValue = new Date(+eleDate);
|
|
1560
1555
|
if (eleDateValue.setHours(0, 0, 0, 0) >= startDateValue.setHours(0, 0, 0, 0) && +eleDate <= +currentDate) {
|
|
1561
1556
|
addClass([ele], RANGEHOVER);
|
|
@@ -1599,9 +1594,11 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1599
1594
|
var eleDate = this.getIdValue(null, ele);
|
|
1600
1595
|
var eleDateValue = this.getIdValue(null, ele);
|
|
1601
1596
|
if (!isNullOrUndefined(this.endValue)) {
|
|
1597
|
+
var eleStartDateValue = this.currentView() === 'Month' ? new Date(+this.startValue) : this.getStartEndDate(new Date(+this.startValue), false);
|
|
1598
|
+
var eleEndDateValue = this.currentView() === 'Month' ? new Date(+this.endValue) : this.getStartEndDate(new Date(+this.endValue), true);
|
|
1602
1599
|
if (this.currentView() === this.depth &&
|
|
1603
|
-
+eleDateValue.setHours(0, 0, 0, 0) >= +
|
|
1604
|
-
&& +eleDateValue.setHours(0, 0, 0, 0) <= +
|
|
1600
|
+
+eleDateValue.setHours(0, 0, 0, 0) >= +eleStartDateValue.setHours(0, 0, 0, 0)
|
|
1601
|
+
&& +eleDateValue.setHours(0, 0, 0, 0) <= +eleEndDateValue.setHours(0, 0, 0, 0) &&
|
|
1605
1602
|
!this.isSameStartEnd(new Date(+this.startValue), new Date(+this.endValue)) &&
|
|
1606
1603
|
+new Date(+this.startValue).setHours(0, 0, 0, 0) >= +this.min
|
|
1607
1604
|
&& +new Date(+this.endValue).setHours(0, 0, 0, 0) <= +this.max
|
|
@@ -1621,7 +1618,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1621
1618
|
removeClass([ele], [RANGEHOVER]);
|
|
1622
1619
|
}
|
|
1623
1620
|
if (!ele.classList.contains(OTHERMONTH)) {
|
|
1624
|
-
var startDateValue = new Date(+this.startValue);
|
|
1621
|
+
var startDateValue = this.currentView() === 'Month' ? new Date(+this.startValue) : this.getStartEndDate(new Date(+this.startValue), false);
|
|
1625
1622
|
var eleDateValue_1 = new Date(+eleDate);
|
|
1626
1623
|
if (this.currentView() === this.depth &&
|
|
1627
1624
|
+eleDateValue_1.setHours(0, 0, 0, 0) === +startDateValue.setHours(0, 0, 0, 0)
|
|
@@ -1632,7 +1629,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1632
1629
|
addClass([ele], [STARTDATE, SELECTED]);
|
|
1633
1630
|
this.addSelectedAttributes(ele, this.startValue, true);
|
|
1634
1631
|
}
|
|
1635
|
-
var endDateValue = new Date(+this.endValue);
|
|
1632
|
+
var endDateValue = this.currentView() === 'Month' ? new Date(+this.endValue) : this.getStartEndDate(new Date(+this.endValue), true);
|
|
1636
1633
|
if (this.currentView() === 'Year') {
|
|
1637
1634
|
eleDateValue_1 = new Date(eleDateValue_1.getFullYear(), eleDateValue_1.getMonth() + 1, 0);
|
|
1638
1635
|
}
|
|
@@ -1725,14 +1722,36 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
1725
1722
|
if (event) {
|
|
1726
1723
|
event.preventDefault();
|
|
1727
1724
|
}
|
|
1725
|
+
var isValue;
|
|
1726
|
+
var startDateValue;
|
|
1727
|
+
var endDateValue;
|
|
1728
|
+
var value = this.inputElement.value;
|
|
1729
|
+
if (!isNullOrUndefined(value) && value.trim() !== '') {
|
|
1730
|
+
var range = value.split(' ' + this.separator + ' ');
|
|
1731
|
+
if (range.length > 1 && ((this.currentView() === 'Year' && this.depth === 'Year')
|
|
1732
|
+
|| (this.currentView() === 'Decade' && this.depth === 'Decade'))) {
|
|
1733
|
+
var dateOptions = { format: this.formatString, type: 'date', skeleton: 'yMd' };
|
|
1734
|
+
startDateValue = this.globalize.parseDate(this.getAmPmValue(range[0]).trim(), dateOptions);
|
|
1735
|
+
endDateValue = this.globalize.parseDate(this.getAmPmValue(range[1]).trim(), dateOptions);
|
|
1736
|
+
isValue = true;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1728
1739
|
var date = isNullOrUndefined(event) ? this.getIdValue(null, element)
|
|
1729
1740
|
: this.getIdValue(event, null);
|
|
1741
|
+
if (!isNullOrUndefined(this.startValue)) {
|
|
1742
|
+
if (this.currentView() === 'Year' && this.depth === 'Year') {
|
|
1743
|
+
date = new Date(date.getFullYear(), date.getMonth(), this.startValue.getDate());
|
|
1744
|
+
}
|
|
1745
|
+
else if (this.currentView() === 'Decade' && this.depth === 'Decade') {
|
|
1746
|
+
date = new Date(date.getFullYear(), this.startValue.getMonth(), this.startValue.getDate());
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1730
1749
|
var y = date.getFullYear();
|
|
1731
1750
|
var m = date.getMonth();
|
|
1732
|
-
var firstDay = new Date(y, m, 1);
|
|
1733
|
-
var lastDay = new Date(y, m + 1, 0);
|
|
1734
|
-
var firstMonth = new Date(y, 0, 1);
|
|
1735
|
-
var lastMonth = new Date(y, 11, 31);
|
|
1751
|
+
var firstDay = isValue ? new Date(y, m, startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, m, 1);
|
|
1752
|
+
var lastDay = isValue ? new Date(y, m, endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, m + 1, 0);
|
|
1753
|
+
var firstMonth = isValue ? new Date(y, startDateValue.getMonth(), startDateValue.getDate(), startDateValue.getHours(), startDateValue.getMinutes(), startDateValue.getSeconds()) : new Date(y, 0, 1);
|
|
1754
|
+
var lastMonth = isValue ? new Date(y, endDateValue.getMonth(), endDateValue.getDate(), endDateValue.getHours(), endDateValue.getMinutes(), endDateValue.getSeconds()) : new Date(y, 11, 31);
|
|
1736
1755
|
if (!isNullOrUndefined(this.endValue) && !isNullOrUndefined(this.startValue)) {
|
|
1737
1756
|
if (!this.isMobile || this.isMobile && !this.endButton.element.classList.contains(ACTIVE)) {
|
|
1738
1757
|
this.removeSelection();
|