@syncfusion/ej2-calendars 31.2.3 → 31.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/README.md +11 -3
- 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 +128 -6
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +128 -6
- 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/datepicker/datepicker.d.ts +2 -0
- package/src/datepicker/datepicker.js +34 -2
- package/src/daterangepicker/daterangepicker.d.ts +2 -0
- package/src/daterangepicker/daterangepicker.js +34 -2
- package/src/datetimepicker/datetimepicker.d.ts +2 -0
- package/src/datetimepicker/datetimepicker.js +26 -0
- package/src/timepicker/timepicker.d.ts +2 -0
- package/src/timepicker/timepicker.js +34 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 31.2.
|
|
3
|
+
* version : 31.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": "31.2.
|
|
3
|
+
"version": "31.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",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-calendars.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~31.2.
|
|
11
|
+
"@syncfusion/ej2-base": "~31.2.5",
|
|
12
12
|
"@syncfusion/ej2-buttons": "~31.2.3",
|
|
13
|
-
"@syncfusion/ej2-inputs": "~31.2.
|
|
13
|
+
"@syncfusion/ej2-inputs": "~31.2.5",
|
|
14
14
|
"@syncfusion/ej2-lists": "~31.2.2",
|
|
15
|
-
"@syncfusion/ej2-popups": "~31.2.
|
|
15
|
+
"@syncfusion/ej2-popups": "~31.2.5"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {},
|
|
18
18
|
"keywords": [
|
|
@@ -535,6 +535,8 @@ export declare class DatePicker extends Calendar implements IInput {
|
|
|
535
535
|
* @private
|
|
536
536
|
*/
|
|
537
537
|
protected getModuleName(): string;
|
|
538
|
+
private updateFloatLabelOverflowWidth;
|
|
539
|
+
private clearFloatLabelOverflowWidth;
|
|
538
540
|
private disabledDates;
|
|
539
541
|
private setAriaAttributes;
|
|
540
542
|
protected errorClass(): void;
|
|
@@ -702,6 +702,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
702
702
|
this.isDateIconClicked = false;
|
|
703
703
|
this.trigger('focus', focusArguments);
|
|
704
704
|
this.updateIconState();
|
|
705
|
+
this.clearFloatLabelOverflowWidth();
|
|
705
706
|
if (this.openOnFocus && !this.isIconClicked) {
|
|
706
707
|
this.show();
|
|
707
708
|
}
|
|
@@ -726,6 +727,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
726
727
|
var dateSame = this.value && this.previousDate
|
|
727
728
|
? this.value.getTime() === this.previousDate.getTime()
|
|
728
729
|
: this.value === this.previousDate;
|
|
730
|
+
this.updateFloatLabelOverflowWidth();
|
|
729
731
|
if (!this.enabled || (inputSame && dateSame)) {
|
|
730
732
|
return;
|
|
731
733
|
}
|
|
@@ -1360,6 +1362,7 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1360
1362
|
else {
|
|
1361
1363
|
this.inputWrapper.container.style.width = '100%';
|
|
1362
1364
|
}
|
|
1365
|
+
this.updateFloatLabelOverflowWidth();
|
|
1363
1366
|
};
|
|
1364
1367
|
/* eslint-disable valid-jsdoc, jsdoc/require-param */
|
|
1365
1368
|
/**
|
|
@@ -1702,8 +1705,14 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1702
1705
|
if (this.inputFormats) {
|
|
1703
1706
|
this.checkInputFormats();
|
|
1704
1707
|
}
|
|
1705
|
-
|
|
1706
|
-
|
|
1708
|
+
if (this.ngTag !== null) {
|
|
1709
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
1710
|
+
this.inputElement.removeAttribute('tabindex');
|
|
1711
|
+
}
|
|
1712
|
+
else {
|
|
1713
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
1714
|
+
this.element.removeAttribute('tabindex');
|
|
1715
|
+
}
|
|
1707
1716
|
_super.prototype.preRender.call(this);
|
|
1708
1717
|
};
|
|
1709
1718
|
DatePicker.prototype.getDefaultKeyConfig = function () {
|
|
@@ -1900,6 +1909,29 @@ var DatePicker = /** @class */ (function (_super) {
|
|
|
1900
1909
|
DatePicker.prototype.getModuleName = function () {
|
|
1901
1910
|
return 'datepicker';
|
|
1902
1911
|
};
|
|
1912
|
+
DatePicker.prototype.updateFloatLabelOverflowWidth = function () {
|
|
1913
|
+
var container = this.inputWrapper.container;
|
|
1914
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
1915
|
+
var width = 0;
|
|
1916
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
1917
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
1918
|
+
for (var index = 0; index < icons.length; index++) {
|
|
1919
|
+
width += icons[index].offsetWidth;
|
|
1920
|
+
}
|
|
1921
|
+
if (label) {
|
|
1922
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
1923
|
+
if (labelWidth) {
|
|
1924
|
+
label.style.width = labelWidth + "px";
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
DatePicker.prototype.clearFloatLabelOverflowWidth = function () {
|
|
1929
|
+
var container = this.inputWrapper.container;
|
|
1930
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
1931
|
+
if (label) {
|
|
1932
|
+
label.removeAttribute('style');
|
|
1933
|
+
}
|
|
1934
|
+
};
|
|
1903
1935
|
DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {
|
|
1904
1936
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
1905
1937
|
if (isBlur === void 0) { isBlur = false; }
|
|
@@ -811,6 +811,8 @@ export declare class DateRangePicker extends CalendarBase {
|
|
|
811
811
|
* @private
|
|
812
812
|
*/
|
|
813
813
|
protected getModuleName(): string;
|
|
814
|
+
private updateFloatLabelOverflowWidth;
|
|
815
|
+
private clearFloatLabelOverflowWidth;
|
|
814
816
|
/**
|
|
815
817
|
* Return the properties that are maintained upon browser refresh.
|
|
816
818
|
*
|
|
@@ -237,8 +237,14 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
237
237
|
if (this.inputFormats) {
|
|
238
238
|
this.checkInputFormats();
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
if (this.angularTag !== null) {
|
|
241
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
242
|
+
this.inputElement.removeAttribute('tabindex');
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
246
|
+
this.element.removeAttribute('tabindex');
|
|
247
|
+
}
|
|
242
248
|
_super.prototype.preRender.call(this);
|
|
243
249
|
this.navNextFunction = this.navNextMonth.bind(this);
|
|
244
250
|
this.navPrevFunction = this.navPrevMonth.bind(this);
|
|
@@ -983,6 +989,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
983
989
|
this.trigger('focus', focusArguments);
|
|
984
990
|
}
|
|
985
991
|
this.updateClearIconState();
|
|
992
|
+
this.clearFloatLabelOverflowWidth();
|
|
986
993
|
if (this.openOnFocus && !this.preventFocus) {
|
|
987
994
|
this.preventFocus = true;
|
|
988
995
|
this.show();
|
|
@@ -992,6 +999,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
992
999
|
}
|
|
993
1000
|
};
|
|
994
1001
|
DateRangePicker.prototype.inputBlurHandler = function (e) {
|
|
1002
|
+
this.updateFloatLabelOverflowWidth();
|
|
995
1003
|
if (!this.enabled) {
|
|
996
1004
|
return;
|
|
997
1005
|
}
|
|
@@ -3596,6 +3604,7 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
3596
3604
|
else {
|
|
3597
3605
|
this.inputWrapper.container.style.width = '100%';
|
|
3598
3606
|
}
|
|
3607
|
+
this.updateFloatLabelOverflowWidth();
|
|
3599
3608
|
};
|
|
3600
3609
|
DateRangePicker.prototype.adjustLongHeaderWidth = function () {
|
|
3601
3610
|
if (this.dayHeaderFormat === 'Wide') {
|
|
@@ -4104,6 +4113,29 @@ var DateRangePicker = /** @class */ (function (_super) {
|
|
|
4104
4113
|
DateRangePicker.prototype.getModuleName = function () {
|
|
4105
4114
|
return 'daterangepicker';
|
|
4106
4115
|
};
|
|
4116
|
+
DateRangePicker.prototype.updateFloatLabelOverflowWidth = function () {
|
|
4117
|
+
var container = this.inputWrapper.container;
|
|
4118
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
4119
|
+
var width = 0;
|
|
4120
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
4121
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
4122
|
+
for (var index = 0; index < icons.length; index++) {
|
|
4123
|
+
width += icons[index].offsetWidth;
|
|
4124
|
+
}
|
|
4125
|
+
if (label) {
|
|
4126
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
4127
|
+
if (labelWidth) {
|
|
4128
|
+
label.style.width = labelWidth + "px";
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
};
|
|
4132
|
+
DateRangePicker.prototype.clearFloatLabelOverflowWidth = function () {
|
|
4133
|
+
var container = this.inputWrapper.container;
|
|
4134
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
4135
|
+
if (label) {
|
|
4136
|
+
label.removeAttribute('style');
|
|
4137
|
+
}
|
|
4138
|
+
};
|
|
4107
4139
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
4108
4140
|
/**
|
|
4109
4141
|
* Return the properties that are maintained upon browser refresh.
|
|
@@ -615,6 +615,8 @@ export declare class DateTimePicker extends DatePicker {
|
|
|
615
615
|
|
|
616
616
|
*/
|
|
617
617
|
onPropertyChanged(newProp: DateTimePickerModel, oldProp: DateTimePickerModel): void;
|
|
618
|
+
private updateLabelOverflowWidth;
|
|
619
|
+
private clearLabelOverflowWidth;
|
|
618
620
|
/**
|
|
619
621
|
* To get component name.
|
|
620
622
|
*
|
|
@@ -91,6 +91,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
|
91
91
|
return _this;
|
|
92
92
|
}
|
|
93
93
|
DateTimePicker.prototype.focusHandler = function () {
|
|
94
|
+
this.clearLabelOverflowWidth();
|
|
94
95
|
if (!this.enabled) {
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
@@ -116,6 +117,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
119
|
DateTimePicker.prototype.blurHandler = function (e) {
|
|
120
|
+
this.updateLabelOverflowWidth();
|
|
119
121
|
if (!this.enabled) {
|
|
120
122
|
return;
|
|
121
123
|
}
|
|
@@ -409,6 +411,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
|
409
411
|
addClass([this.inputWrapper.container], DATETIMEWRAPPER);
|
|
410
412
|
addClass([this.inputElement], ROOT);
|
|
411
413
|
this.renderTimeIcon();
|
|
414
|
+
this.updateLabelOverflowWidth();
|
|
412
415
|
};
|
|
413
416
|
DateTimePicker.prototype.renderTimeIcon = function () {
|
|
414
417
|
this.timeIcon = Input.appendSpan(INPUTWRAPPER + ' ' + TIMEICON + ' ' + ICONS, this.inputWrapper.container);
|
|
@@ -1690,6 +1693,29 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
|
1690
1693
|
this.isDynamicValueChanged = false;
|
|
1691
1694
|
}
|
|
1692
1695
|
};
|
|
1696
|
+
DateTimePicker.prototype.updateLabelOverflowWidth = function () {
|
|
1697
|
+
var container = this.inputWrapper.container;
|
|
1698
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
1699
|
+
var width = 0;
|
|
1700
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
1701
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
1702
|
+
for (var index = 0; index < icons.length; index++) {
|
|
1703
|
+
width += icons[index].offsetWidth;
|
|
1704
|
+
}
|
|
1705
|
+
if (label) {
|
|
1706
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
1707
|
+
if (labelWidth) {
|
|
1708
|
+
label.style.width = labelWidth + "px";
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
};
|
|
1712
|
+
DateTimePicker.prototype.clearLabelOverflowWidth = function () {
|
|
1713
|
+
var container = this.inputWrapper.container;
|
|
1714
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
1715
|
+
if (label) {
|
|
1716
|
+
label.removeAttribute('style');
|
|
1717
|
+
}
|
|
1718
|
+
};
|
|
1693
1719
|
/**
|
|
1694
1720
|
* To get component name.
|
|
1695
1721
|
*
|
|
@@ -668,6 +668,8 @@ export declare class TimePicker extends Component<HTMLElement> implements IInput
|
|
|
668
668
|
* @private
|
|
669
669
|
*/
|
|
670
670
|
protected getModuleName(): string;
|
|
671
|
+
private updateFloatLabelOverflowWidth;
|
|
672
|
+
private clearFloatLabelOverflowWidth;
|
|
671
673
|
/**
|
|
672
674
|
* Called internally if any of the property value changed.
|
|
673
675
|
*
|
|
@@ -170,8 +170,6 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
170
170
|
this.inputElement = this.createElement('input');
|
|
171
171
|
this.element.appendChild(this.inputElement);
|
|
172
172
|
}
|
|
173
|
-
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
174
|
-
this.element.removeAttribute('tabindex');
|
|
175
173
|
this.openPopupEventArgs = {
|
|
176
174
|
appendTo: document.body
|
|
177
175
|
};
|
|
@@ -294,6 +292,14 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
294
292
|
var localeText = { placeholder: this.placeholder };
|
|
295
293
|
this.l10n = new L10n('timepicker', localeText, this.locale);
|
|
296
294
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
295
|
+
if (this.angularTag !== null) {
|
|
296
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
297
|
+
this.inputElement.removeAttribute('tabindex');
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
301
|
+
this.element.removeAttribute('tabindex');
|
|
302
|
+
}
|
|
297
303
|
this.initValue = this.checkDateValue(this.value);
|
|
298
304
|
this.initMin = this.checkDateValue(this.min);
|
|
299
305
|
this.initMax = this.checkDateValue(this.max);
|
|
@@ -364,6 +370,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
364
370
|
buttons: [' e-input-group-icon e-time-icon e-icons']
|
|
365
371
|
}, this.createElement);
|
|
366
372
|
this.inputWrapper.container.style.width = this.setWidth(this.width);
|
|
373
|
+
this.updateFloatLabelOverflowWidth();
|
|
367
374
|
attributes(this.inputElement, {
|
|
368
375
|
'aria-autocomplete': 'list', 'tabindex': '0',
|
|
369
376
|
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
@@ -2096,6 +2103,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
2096
2103
|
this.checkValueChange(null, false);
|
|
2097
2104
|
};
|
|
2098
2105
|
TimePicker.prototype.inputBlurHandler = function (e) {
|
|
2106
|
+
this.updateFloatLabelOverflowWidth();
|
|
2099
2107
|
if (!this.enabled) {
|
|
2100
2108
|
return;
|
|
2101
2109
|
}
|
|
@@ -2170,6 +2178,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
2170
2178
|
}
|
|
2171
2179
|
this.trigger('focus', focusArguments);
|
|
2172
2180
|
this.clearIconState();
|
|
2181
|
+
this.clearFloatLabelOverflowWidth();
|
|
2173
2182
|
if (this.openOnFocus) {
|
|
2174
2183
|
this.show();
|
|
2175
2184
|
}
|
|
@@ -2354,6 +2363,29 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
2354
2363
|
TimePicker.prototype.getModuleName = function () {
|
|
2355
2364
|
return 'timepicker';
|
|
2356
2365
|
};
|
|
2366
|
+
TimePicker.prototype.updateFloatLabelOverflowWidth = function () {
|
|
2367
|
+
var container = this.inputWrapper.container;
|
|
2368
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
2369
|
+
var width = 0;
|
|
2370
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
2371
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
2372
|
+
for (var index = 0; index < icons.length; index++) {
|
|
2373
|
+
width += icons[index].offsetWidth;
|
|
2374
|
+
}
|
|
2375
|
+
if (label) {
|
|
2376
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
2377
|
+
if (labelWidth) {
|
|
2378
|
+
label.style.width = labelWidth + "px";
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
};
|
|
2382
|
+
TimePicker.prototype.clearFloatLabelOverflowWidth = function () {
|
|
2383
|
+
var container = this.inputWrapper.container;
|
|
2384
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
2385
|
+
if (label) {
|
|
2386
|
+
label.removeAttribute('style');
|
|
2387
|
+
}
|
|
2388
|
+
};
|
|
2357
2389
|
/**
|
|
2358
2390
|
* Called internally if any of the property value changed.
|
|
2359
2391
|
*
|