@syncfusion/ej2-calendars 33.2.3 → 33.2.5
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 +16 -12
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +16 -12
- 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 +4 -4
- package/src/daterangepicker/daterangepicker.d.ts +1 -0
- package/src/daterangepicker/daterangepicker.js +16 -12
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 33.2.
|
|
3
|
+
* version : 33.2.5
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. 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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-calendars",
|
|
3
|
-
"version": "33.2.
|
|
3
|
+
"version": "33.2.5",
|
|
4
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
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"es2015": "./dist/es6/ej2-calendars.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@syncfusion/ej2-base": "~33.2.3",
|
|
12
|
-
"@syncfusion/ej2-buttons": "~33.2.
|
|
13
|
-
"@syncfusion/ej2-inputs": "~33.2.
|
|
12
|
+
"@syncfusion/ej2-buttons": "~33.2.5",
|
|
13
|
+
"@syncfusion/ej2-inputs": "~33.2.5",
|
|
14
14
|
"@syncfusion/ej2-lists": "~33.2.3",
|
|
15
|
-
"@syncfusion/ej2-popups": "~33.2.
|
|
15
|
+
"@syncfusion/ej2-popups": "~33.2.5"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {},
|
|
18
18
|
"keywords": [
|
|
@@ -631,6 +631,7 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
631
631
|
private updateHtmlAttributeToWrapper;
|
|
632
632
|
private updateHtmlAttributeToElement;
|
|
633
633
|
private updateCssClass;
|
|
634
|
+
private isValidPreset;
|
|
634
635
|
private processPresets;
|
|
635
636
|
protected bindEvents(): void;
|
|
636
637
|
private unBindEvents;
|
|
@@ -505,10 +505,13 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
505
505
|
Input.setCssClass(cssNewClass, [this.popupWrapper], cssOldClass);
|
|
506
506
|
}
|
|
507
507
|
};
|
|
508
|
+
DateRangePicker.prototype.isValidPreset = function () {
|
|
509
|
+
return !isNullOrUndefined(this.presets[0]) && !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label);
|
|
510
|
+
};
|
|
508
511
|
DateRangePicker.prototype.processPresets = function () {
|
|
509
512
|
this.presetsItem = [];
|
|
510
513
|
var i = 0;
|
|
511
|
-
if (
|
|
514
|
+
if (this.isValidPreset()) {
|
|
512
515
|
for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {
|
|
513
516
|
var range = _a[_i];
|
|
514
517
|
var id = range.label.replace(/\s+/g, '') + '_' + (++i);
|
|
@@ -828,7 +831,8 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
828
831
|
this.popupWrapper.setAttribute('role', 'dialog');
|
|
829
832
|
this.adjustLongHeaderWidth();
|
|
830
833
|
var isPreset = (!this.isCustomRange || this.isMobile);
|
|
831
|
-
if (
|
|
834
|
+
if (this.isValidPreset()
|
|
835
|
+
&& isPreset) {
|
|
832
836
|
this.isCustomWindow = false;
|
|
833
837
|
this.createPresets();
|
|
834
838
|
this.listRippleEffect();
|
|
@@ -2824,7 +2828,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2824
2828
|
EventHandler.add(cancelBtn, 'click', this.cancelFunction, this);
|
|
2825
2829
|
this.popupWrapper.appendChild(controlContainer);
|
|
2826
2830
|
if (!this.isMobile) {
|
|
2827
|
-
if (
|
|
2831
|
+
if (this.isValidPreset()) {
|
|
2828
2832
|
this.createPresets();
|
|
2829
2833
|
this.listRippleEffect();
|
|
2830
2834
|
addClass([controlContainer], RANGEBORDER);
|
|
@@ -2928,6 +2932,9 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
2928
2932
|
});
|
|
2929
2933
|
}
|
|
2930
2934
|
}
|
|
2935
|
+
if (this.isRangeIconClicked && this.openOnFocus) {
|
|
2936
|
+
this.isRangeIconClicked = false;
|
|
2937
|
+
}
|
|
2931
2938
|
};
|
|
2932
2939
|
DateRangePicker.prototype.onMouseClick = function (event, item) {
|
|
2933
2940
|
if (event.type === 'touchstart') {
|
|
@@ -3066,7 +3073,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3066
3073
|
}
|
|
3067
3074
|
};
|
|
3068
3075
|
DateRangePicker.prototype.createPresets = function () {
|
|
3069
|
-
if (
|
|
3076
|
+
if (this.isValidPreset()) {
|
|
3070
3077
|
this.presetElement = this.createElement('div', { className: PRESETS, attrs: { 'tabindex': '0' } });
|
|
3071
3078
|
var listTag = ListBase.createList(this.createElement, this.presetsItem, null, true);
|
|
3072
3079
|
attributes(listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options', 'tabindex': '0', 'aria-label': 'daterangepicker-preset' });
|
|
@@ -3136,14 +3143,12 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3136
3143
|
relateTo: this.isMobile && this.isCustomWindow ? document.body :
|
|
3137
3144
|
(!isNullOrUndefined(this.targetElement) ? this.targetElement : this.inputWrapper.container),
|
|
3138
3145
|
position: (this.isMobile ?
|
|
3139
|
-
(
|
|
3140
|
-
{ X: 'left', Y: 'bottom' } : { X: 'center', Y: 'center' }) :
|
|
3146
|
+
(this.isValidPreset() && !this.isCustomWindow ? { X: 'left', Y: 'bottom' } : { X: 'center', Y: 'center' }) :
|
|
3141
3147
|
this.enableRtl ? { X: 'left', Y: 'bottom' } : { X: 'right', Y: 'bottom' }),
|
|
3142
3148
|
offsetX: this.isMobile || this.enableRtl ? 0 : -popupWidth,
|
|
3143
3149
|
offsetY: OFFSETVALUE,
|
|
3144
3150
|
collision: this.isMobile ?
|
|
3145
|
-
(
|
|
3146
|
-
{ X: 'fit' } : { X: 'fit', Y: 'fit' }) : { X: 'fit', Y: 'flip' },
|
|
3151
|
+
(this.isValidPreset() && !this.isCustomWindow ? { X: 'fit' } : { X: 'fit', Y: 'fit' }) : { X: 'fit', Y: 'flip' },
|
|
3147
3152
|
targetType: this.isMobile && this.isCustomWindow ? 'container' : 'relative',
|
|
3148
3153
|
enableRtl: this.enableRtl,
|
|
3149
3154
|
zIndex: this.zIndex,
|
|
@@ -3218,7 +3223,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3218
3223
|
if (_this.isRangeIconClicked) {
|
|
3219
3224
|
_this.inputWrapper.container.children[1].focus();
|
|
3220
3225
|
}
|
|
3221
|
-
if (
|
|
3226
|
+
if (_this.isValidPreset()) {
|
|
3222
3227
|
_this.unWireListEvents();
|
|
3223
3228
|
}
|
|
3224
3229
|
if (_this.applyButton) {
|
|
@@ -4226,7 +4231,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4226
4231
|
_this.openEventArgs.appendTo.appendChild(_this.popupWrapper);
|
|
4227
4232
|
_this.showPopup(element, event);
|
|
4228
4233
|
var isPreset = (!_this.isCustomRange || (_this.isMobile && _this.isCustomRange));
|
|
4229
|
-
if (
|
|
4234
|
+
if (_this.isValidPreset() && isPreset) {
|
|
4230
4235
|
_this.setScrollPosition();
|
|
4231
4236
|
}
|
|
4232
4237
|
_this.checkMinMaxDays();
|
|
@@ -4239,8 +4244,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4239
4244
|
_super.prototype.setOverlayIndex.call(_this, _this.mobileRangePopupWrap, _this.popupObj.element, _this.modal, _this.isMobile || Browser.isDevice);
|
|
4240
4245
|
if (!isNullOrUndefined(_this.mobileRangePopupWrap) && !isNullOrUndefined(_this.popupObj)
|
|
4241
4246
|
&& !isNullOrUndefined(_this.popupObj.element) && isNullOrUndefined(_this.modal) &&
|
|
4242
|
-
|
|
4243
|
-
&& (_this.isMobile || Browser.isDevice) && !_this.isCustomWindow) {
|
|
4247
|
+
_this.isValidPreset() && isPreset && (_this.isMobile || Browser.isDevice) && !_this.isCustomWindow) {
|
|
4244
4248
|
var index = parseInt(_this.popupObj.element.style.zIndex, 10) ?
|
|
4245
4249
|
parseInt(_this.popupObj.element.style.zIndex, 10) : 1000;
|
|
4246
4250
|
_this.mobileRangePopupWrap.style.zIndex = index.toString();
|