@syncfusion/ej2-calendars 29.2.4 → 29.2.10

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 : 29.2.4
3
+ * version : 29.2.10
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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,59 +1,20 @@
1
1
  {
2
- "_from": "@syncfusion/ej2-calendars@*",
3
- "_id": "@syncfusion/ej2-calendars@29.1.40",
4
- "_inBundle": false,
5
- "_integrity": "sha512-Ql6ZKLMlEptNAbTMepV3bbsEL3z+dyrcTrsaRrjXvZcyDI/A+ejhyA8qE4k9hASSBS27uYhcjvAr3NzzT4ZvNA==",
6
- "_location": "/@syncfusion/ej2-calendars",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "@syncfusion/ej2-calendars@*",
12
- "name": "@syncfusion/ej2-calendars",
13
- "escapedName": "@syncfusion%2fej2-calendars",
14
- "scope": "@syncfusion",
15
- "rawSpec": "*",
16
- "saveSpec": null,
17
- "fetchSpec": "*"
18
- },
19
- "_requiredBy": [
20
- "/",
21
- "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-calendars",
23
- "/@syncfusion/ej2-charts",
24
- "/@syncfusion/ej2-documenteditor",
25
- "/@syncfusion/ej2-gantt",
26
- "/@syncfusion/ej2-grids",
27
- "/@syncfusion/ej2-inplace-editor",
28
- "/@syncfusion/ej2-pivotview",
29
- "/@syncfusion/ej2-querybuilder",
30
- "/@syncfusion/ej2-react-calendars",
31
- "/@syncfusion/ej2-schedule",
32
- "/@syncfusion/ej2-vue-calendars"
33
- ],
34
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-calendars/-/ej2-calendars-29.1.40.tgz",
35
- "_shasum": "54af8fc2a69e00e1da79f69789ec89441ac80b52",
36
- "_spec": "@syncfusion/ej2-calendars@*",
37
- "_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
38
- "author": {
39
- "name": "Syncfusion Inc."
40
- },
41
- "bugs": {
42
- "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/issues"
43
- },
44
- "bundleDependencies": false,
2
+ "name": "@syncfusion/ej2-calendars",
3
+ "version": "29.2.10",
4
+ "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.",
5
+ "author": "Syncfusion Inc.",
6
+ "license": "SEE LICENSE IN license",
7
+ "main": "./dist/ej2-calendars.umd.min.js",
8
+ "module": "./index.js",
9
+ "es2015": "./dist/es6/ej2-calendars.es5.js",
45
10
  "dependencies": {
46
11
  "@syncfusion/ej2-base": "~29.2.4",
47
- "@syncfusion/ej2-buttons": "~29.2.4",
48
- "@syncfusion/ej2-inputs": "~29.2.4",
12
+ "@syncfusion/ej2-buttons": "~29.2.5",
13
+ "@syncfusion/ej2-inputs": "~29.2.5",
49
14
  "@syncfusion/ej2-lists": "~29.2.4",
50
- "@syncfusion/ej2-popups": "~29.2.4"
15
+ "@syncfusion/ej2-popups": "~29.2.8"
51
16
  },
52
- "deprecated": false,
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.",
54
17
  "devDependencies": {},
55
- "es2015": "./dist/es6/ej2-calendars.es5.js",
56
- "homepage": "https://www.syncfusion.com/javascript-ui-controls",
57
18
  "keywords": [
58
19
  "ej2",
59
20
  "syncfusion",
@@ -71,15 +32,11 @@
71
32
  "stepranges",
72
33
  "time"
73
34
  ],
74
- "license": "SEE LICENSE IN license",
75
- "main": "./dist/ej2-calendars.umd.min.js",
76
- "module": "./index.js",
77
- "name": "@syncfusion/ej2-calendars",
78
35
  "repository": {
79
36
  "type": "git",
80
- "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
37
+ "url": "https://github.com/syncfusion/ej2-javascript-ui-controls.git"
81
38
  },
82
39
  "typings": "index.d.ts",
83
- "version": "29.2.4",
84
- "sideEffects": false
40
+ "sideEffects": false,
41
+ "homepage": "https://www.syncfusion.com/javascript-ui-controls"
85
42
  }
@@ -765,10 +765,14 @@ var DatePicker = /** @class */ (function (_super) {
765
765
  var target = e.target;
766
766
  if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)
767
767
  && !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)
768
- && (!target.classList.contains('e-day'))
769
- && (!target.classList.contains('e-dlg-overlay'))) {
768
+ && (!target.classList.contains('e-day'))) {
770
769
  this.hide(e);
771
- this.focusOut();
770
+ if (target.classList.contains('e-dlg-overlay')) {
771
+ e.preventDefault();
772
+ }
773
+ else {
774
+ this.focusOut();
775
+ }
772
776
  }
773
777
  else if (closest(target, '.e-datepicker.e-popup-wrapper')) {
774
778
  // Fix for close the popup when select the previously selected value.
@@ -1251,6 +1255,9 @@ var DatePicker = /** @class */ (function (_super) {
1251
1255
  this.changedArgs.element = this.element;
1252
1256
  this.changedArgs.isInteracted = this.isInteracted;
1253
1257
  if (!this.isDynamicValueChanged) {
1258
+ if (this.isAngular) {
1259
+ this.previousDate = this.value && new Date(+this.value);
1260
+ }
1254
1261
  this.trigger('change', this.changedArgs);
1255
1262
  }
1256
1263
  this.previousDate = this.value && new Date(+this.value);
@@ -986,6 +986,9 @@ var DateRangePicker = /** @class */ (function (_super) {
986
986
  if (this.inputElement.defaultValue !== value) {
987
987
  endDate = this.getStartEndDate(endDate, true);
988
988
  }
989
+ if (endDate >= this.max) {
990
+ endDate = this.max;
991
+ }
989
992
  }
990
993
  if (!isNullOrUndefined(startDate) && !isNaN(+startDate) && !isNullOrUndefined(endDate) && !isNaN(+endDate)) {
991
994
  var prevStartVal = this.startValue;
@@ -1874,6 +1877,29 @@ var DateRangePicker = /** @class */ (function (_super) {
1874
1877
  this.checkMinMaxDays();
1875
1878
  }
1876
1879
  }
1880
+ var isCustomMin = this.min.getTime() !== new Date(1900, 0, 1).getTime();
1881
+ var isCustomMax = this.max.getTime() !== new Date(2099, 11, 31).getTime();
1882
+ if (this.currentView() === 'Year' && this.depth === 'Year') {
1883
+ var startMonth = new Date(this.min.getFullYear(), this.min.getMonth(), 1);
1884
+ if (!isNullOrUndefined(this.startValue) && isCustomMin && +this.startValue <= +startMonth) {
1885
+ this.startValue = this.min;
1886
+ }
1887
+ var endMonth = new Date(this.max.getFullYear(), this.max.getMonth() + 1, 0);
1888
+ if (!isNullOrUndefined(this.endValue) && isCustomMax && +this.endValue >= +endMonth) {
1889
+ this.endValue = this.max;
1890
+ }
1891
+ }
1892
+ else if (this.currentView() === 'Decade' && this.depth === 'Decade') {
1893
+ if (!isNullOrUndefined(this.startValue) && isCustomMin && this.startValue.getFullYear() <= this.min.getFullYear()) {
1894
+ this.startValue = this.min;
1895
+ }
1896
+ else if (isCustomMin && this.startValue.getFullYear() > this.min.getFullYear()) {
1897
+ this.startValue = new Date(this.startValue.getFullYear(), 0, 1);
1898
+ }
1899
+ if (!isNullOrUndefined(this.endValue) && isCustomMax && this.endValue.getFullYear() >= this.max.getFullYear()) {
1900
+ this.endValue = this.max;
1901
+ }
1902
+ }
1877
1903
  if (event) {
1878
1904
  leftCalendar = closest(event.target, '.' + LEFTCALENDER);
1879
1905
  }
@@ -675,10 +675,15 @@ var DateTimePicker = /** @class */ (function (_super) {
675
675
  event.preventDefault();
676
676
  }
677
677
  if (!(closest(target, '[id="' + (this.popupObject && this.popupObject.element.id + '"]'))) && target !== this.inputElement
678
- && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container && !target.classList.contains('e-dlg-overlay')) {
678
+ && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container) {
679
679
  if (this.isTimePopupOpen()) {
680
680
  this.hide(event);
681
- this.focusOut();
681
+ if (target.classList.contains('e-dlg-overlay')) {
682
+ event.preventDefault();
683
+ }
684
+ else {
685
+ this.focusOut();
686
+ }
682
687
  }
683
688
  }
684
689
  else if (target !== this.inputElement) {
@@ -1335,7 +1335,7 @@ var TimePicker = /** @class */ (function (_super) {
1335
1335
  keyConfigs: this.keyConfigure,
1336
1336
  eventName: 'keydown'
1337
1337
  });
1338
- if (this.showClearButton && this.inputElement) {
1338
+ if (this.inputElement && (this.showClearButton || this.enableMask)) {
1339
1339
  EventHandler.add(this.inputElement, 'mousedown', this.mouseDownHandler, this);
1340
1340
  }
1341
1341
  }
@@ -2039,11 +2039,15 @@ var TimePicker = /** @class */ (function (_super) {
2039
2039
  if (!(closest(target, '[id="' + this.popupObj.element.id + '"]')) && target !== this.inputElement
2040
2040
  && target !== (this.inputWrapper && this.inputWrapper.buttons[0]) &&
2041
2041
  target !== (this.inputWrapper && this.inputWrapper.clearButton) &&
2042
- target !== (this.inputWrapper && this.inputWrapper.container)
2043
- && (!target.classList.contains('e-dlg-overlay'))) {
2042
+ target !== (this.inputWrapper && this.inputWrapper.container)) {
2044
2043
  if (this.isPopupOpen()) {
2045
2044
  this.hide();
2046
- this.focusOut();
2045
+ if (target.classList.contains('e-dlg-overlay')) {
2046
+ event.preventDefault();
2047
+ }
2048
+ else {
2049
+ this.focusOut();
2050
+ }
2047
2051
  }
2048
2052
  }
2049
2053
  else if (target !== this.inputElement) {