@syncfusion/ej2-calendars 31.2.2 → 31.2.4
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
|
@@ -3976,6 +3976,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
3976
3976
|
this.isDateIconClicked = false;
|
|
3977
3977
|
this.trigger('focus', focusArguments);
|
|
3978
3978
|
this.updateIconState();
|
|
3979
|
+
this.clearFloatLabelOverflowWidth();
|
|
3979
3980
|
if (this.openOnFocus && !this.isIconClicked) {
|
|
3980
3981
|
this.show();
|
|
3981
3982
|
}
|
|
@@ -4000,6 +4001,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4000
4001
|
var dateSame = this.value && this.previousDate
|
|
4001
4002
|
? this.value.getTime() === this.previousDate.getTime()
|
|
4002
4003
|
: this.value === this.previousDate;
|
|
4004
|
+
this.updateFloatLabelOverflowWidth();
|
|
4003
4005
|
if (!this.enabled || (inputSame && dateSame)) {
|
|
4004
4006
|
return;
|
|
4005
4007
|
}
|
|
@@ -4630,6 +4632,7 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4630
4632
|
else {
|
|
4631
4633
|
this.inputWrapper.container.style.width = '100%';
|
|
4632
4634
|
}
|
|
4635
|
+
this.updateFloatLabelOverflowWidth();
|
|
4633
4636
|
};
|
|
4634
4637
|
/* eslint-disable valid-jsdoc, jsdoc/require-param */
|
|
4635
4638
|
/**
|
|
@@ -4972,8 +4975,14 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
4972
4975
|
if (this.inputFormats) {
|
|
4973
4976
|
this.checkInputFormats();
|
|
4974
4977
|
}
|
|
4975
|
-
|
|
4976
|
-
|
|
4978
|
+
if (this.ngTag !== null) {
|
|
4979
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
4980
|
+
this.inputElement.removeAttribute('tabindex');
|
|
4981
|
+
}
|
|
4982
|
+
else {
|
|
4983
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
4984
|
+
this.element.removeAttribute('tabindex');
|
|
4985
|
+
}
|
|
4977
4986
|
_super.prototype.preRender.call(this);
|
|
4978
4987
|
};
|
|
4979
4988
|
DatePicker.prototype.getDefaultKeyConfig = function () {
|
|
@@ -5170,6 +5179,29 @@ var DatePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5170
5179
|
DatePicker.prototype.getModuleName = function () {
|
|
5171
5180
|
return 'datepicker';
|
|
5172
5181
|
};
|
|
5182
|
+
DatePicker.prototype.updateFloatLabelOverflowWidth = function () {
|
|
5183
|
+
var container = this.inputWrapper.container;
|
|
5184
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
5185
|
+
var width = 0;
|
|
5186
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
5187
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
5188
|
+
for (var index = 0; index < icons.length; index++) {
|
|
5189
|
+
width += icons[index].offsetWidth;
|
|
5190
|
+
}
|
|
5191
|
+
if (label) {
|
|
5192
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
5193
|
+
if (labelWidth) {
|
|
5194
|
+
label.style.width = labelWidth + "px";
|
|
5195
|
+
}
|
|
5196
|
+
}
|
|
5197
|
+
};
|
|
5198
|
+
DatePicker.prototype.clearFloatLabelOverflowWidth = function () {
|
|
5199
|
+
var container = this.inputWrapper.container;
|
|
5200
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
5201
|
+
if (label) {
|
|
5202
|
+
label.removeAttribute('style');
|
|
5203
|
+
}
|
|
5204
|
+
};
|
|
5173
5205
|
DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {
|
|
5174
5206
|
if (isDynamic === void 0) { isDynamic = false; }
|
|
5175
5207
|
if (isBlur === void 0) { isBlur = false; }
|
|
@@ -5765,8 +5797,14 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
5765
5797
|
if (this.inputFormats) {
|
|
5766
5798
|
this.checkInputFormats();
|
|
5767
5799
|
}
|
|
5768
|
-
|
|
5769
|
-
|
|
5800
|
+
if (this.angularTag !== null) {
|
|
5801
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
5802
|
+
this.inputElement.removeAttribute('tabindex');
|
|
5803
|
+
}
|
|
5804
|
+
else {
|
|
5805
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
5806
|
+
this.element.removeAttribute('tabindex');
|
|
5807
|
+
}
|
|
5770
5808
|
_super.prototype.preRender.call(this);
|
|
5771
5809
|
this.navNextFunction = this.navNextMonth.bind(this);
|
|
5772
5810
|
this.navPrevFunction = this.navPrevMonth.bind(this);
|
|
@@ -6511,6 +6549,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
6511
6549
|
this.trigger('focus', focusArguments);
|
|
6512
6550
|
}
|
|
6513
6551
|
this.updateClearIconState();
|
|
6552
|
+
this.clearFloatLabelOverflowWidth();
|
|
6514
6553
|
if (this.openOnFocus && !this.preventFocus) {
|
|
6515
6554
|
this.preventFocus = true;
|
|
6516
6555
|
this.show();
|
|
@@ -6520,6 +6559,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
6520
6559
|
}
|
|
6521
6560
|
};
|
|
6522
6561
|
DateRangePicker.prototype.inputBlurHandler = function (e) {
|
|
6562
|
+
this.updateFloatLabelOverflowWidth();
|
|
6523
6563
|
if (!this.enabled) {
|
|
6524
6564
|
return;
|
|
6525
6565
|
}
|
|
@@ -9120,6 +9160,7 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9120
9160
|
else {
|
|
9121
9161
|
this.inputWrapper.container.style.width = '100%';
|
|
9122
9162
|
}
|
|
9163
|
+
this.updateFloatLabelOverflowWidth();
|
|
9123
9164
|
};
|
|
9124
9165
|
DateRangePicker.prototype.adjustLongHeaderWidth = function () {
|
|
9125
9166
|
if (this.dayHeaderFormat === 'Wide') {
|
|
@@ -9628,6 +9669,29 @@ var DateRangePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
9628
9669
|
DateRangePicker.prototype.getModuleName = function () {
|
|
9629
9670
|
return 'daterangepicker';
|
|
9630
9671
|
};
|
|
9672
|
+
DateRangePicker.prototype.updateFloatLabelOverflowWidth = function () {
|
|
9673
|
+
var container = this.inputWrapper.container;
|
|
9674
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
9675
|
+
var width = 0;
|
|
9676
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
9677
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
9678
|
+
for (var index = 0; index < icons.length; index++) {
|
|
9679
|
+
width += icons[index].offsetWidth;
|
|
9680
|
+
}
|
|
9681
|
+
if (label) {
|
|
9682
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
9683
|
+
if (labelWidth) {
|
|
9684
|
+
label.style.width = labelWidth + "px";
|
|
9685
|
+
}
|
|
9686
|
+
}
|
|
9687
|
+
};
|
|
9688
|
+
DateRangePicker.prototype.clearFloatLabelOverflowWidth = function () {
|
|
9689
|
+
var container = this.inputWrapper.container;
|
|
9690
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
9691
|
+
if (label) {
|
|
9692
|
+
label.removeAttribute('style');
|
|
9693
|
+
}
|
|
9694
|
+
};
|
|
9631
9695
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
9632
9696
|
/**
|
|
9633
9697
|
* Return the properties that are maintained upon browser refresh.
|
|
@@ -10473,8 +10537,6 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10473
10537
|
this.inputElement = this.createElement('input');
|
|
10474
10538
|
this.element.appendChild(this.inputElement);
|
|
10475
10539
|
}
|
|
10476
|
-
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
10477
|
-
this.element.removeAttribute('tabindex');
|
|
10478
10540
|
this.openPopupEventArgs = {
|
|
10479
10541
|
appendTo: document.body
|
|
10480
10542
|
};
|
|
@@ -10597,6 +10659,14 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10597
10659
|
var localeText = { placeholder: this.placeholder };
|
|
10598
10660
|
this.l10n = new L10n('timepicker', localeText, this.locale);
|
|
10599
10661
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
10662
|
+
if (this.angularTag !== null) {
|
|
10663
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
10664
|
+
this.inputElement.removeAttribute('tabindex');
|
|
10665
|
+
}
|
|
10666
|
+
else {
|
|
10667
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
10668
|
+
this.element.removeAttribute('tabindex');
|
|
10669
|
+
}
|
|
10600
10670
|
this.initValue = this.checkDateValue(this.value);
|
|
10601
10671
|
this.initMin = this.checkDateValue(this.min);
|
|
10602
10672
|
this.initMax = this.checkDateValue(this.max);
|
|
@@ -10667,6 +10737,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
10667
10737
|
buttons: [' e-input-group-icon e-time-icon e-icons']
|
|
10668
10738
|
}, this.createElement);
|
|
10669
10739
|
this.inputWrapper.container.style.width = this.setWidth(this.width);
|
|
10740
|
+
this.updateFloatLabelOverflowWidth();
|
|
10670
10741
|
attributes(this.inputElement, {
|
|
10671
10742
|
'aria-autocomplete': 'list', 'tabindex': '0',
|
|
10672
10743
|
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
@@ -12397,6 +12468,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12397
12468
|
this.checkValueChange(null, false);
|
|
12398
12469
|
};
|
|
12399
12470
|
TimePicker.prototype.inputBlurHandler = function (e) {
|
|
12471
|
+
this.updateFloatLabelOverflowWidth();
|
|
12400
12472
|
if (!this.enabled) {
|
|
12401
12473
|
return;
|
|
12402
12474
|
}
|
|
@@ -12471,6 +12543,7 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12471
12543
|
}
|
|
12472
12544
|
this.trigger('focus', focusArguments);
|
|
12473
12545
|
this.clearIconState();
|
|
12546
|
+
this.clearFloatLabelOverflowWidth();
|
|
12474
12547
|
if (this.openOnFocus) {
|
|
12475
12548
|
this.show();
|
|
12476
12549
|
}
|
|
@@ -12655,6 +12728,29 @@ var TimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12655
12728
|
TimePicker.prototype.getModuleName = function () {
|
|
12656
12729
|
return 'timepicker';
|
|
12657
12730
|
};
|
|
12731
|
+
TimePicker.prototype.updateFloatLabelOverflowWidth = function () {
|
|
12732
|
+
var container = this.inputWrapper.container;
|
|
12733
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
12734
|
+
var width = 0;
|
|
12735
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
12736
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
12737
|
+
for (var index = 0; index < icons.length; index++) {
|
|
12738
|
+
width += icons[index].offsetWidth;
|
|
12739
|
+
}
|
|
12740
|
+
if (label) {
|
|
12741
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
12742
|
+
if (labelWidth) {
|
|
12743
|
+
label.style.width = labelWidth + "px";
|
|
12744
|
+
}
|
|
12745
|
+
}
|
|
12746
|
+
};
|
|
12747
|
+
TimePicker.prototype.clearFloatLabelOverflowWidth = function () {
|
|
12748
|
+
var container = this.inputWrapper.container;
|
|
12749
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
12750
|
+
if (label) {
|
|
12751
|
+
label.removeAttribute('style');
|
|
12752
|
+
}
|
|
12753
|
+
};
|
|
12658
12754
|
/**
|
|
12659
12755
|
* Called internally if any of the property value changed.
|
|
12660
12756
|
*
|
|
@@ -13019,6 +13115,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13019
13115
|
return _this;
|
|
13020
13116
|
}
|
|
13021
13117
|
DateTimePicker.prototype.focusHandler = function () {
|
|
13118
|
+
this.clearLabelOverflowWidth();
|
|
13022
13119
|
if (!this.enabled) {
|
|
13023
13120
|
return;
|
|
13024
13121
|
}
|
|
@@ -13044,6 +13141,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13044
13141
|
}
|
|
13045
13142
|
};
|
|
13046
13143
|
DateTimePicker.prototype.blurHandler = function (e) {
|
|
13144
|
+
this.updateLabelOverflowWidth();
|
|
13047
13145
|
if (!this.enabled) {
|
|
13048
13146
|
return;
|
|
13049
13147
|
}
|
|
@@ -13337,6 +13435,7 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13337
13435
|
addClass([this.inputWrapper.container], DATETIMEWRAPPER);
|
|
13338
13436
|
addClass([this.inputElement], ROOT$4);
|
|
13339
13437
|
this.renderTimeIcon();
|
|
13438
|
+
this.updateLabelOverflowWidth();
|
|
13340
13439
|
};
|
|
13341
13440
|
DateTimePicker.prototype.renderTimeIcon = function () {
|
|
13342
13441
|
this.timeIcon = Input.appendSpan(INPUTWRAPPER$1 + ' ' + TIMEICON + ' ' + ICONS$1, this.inputWrapper.container);
|
|
@@ -14618,6 +14717,29 @@ var DateTimePicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
14618
14717
|
this.isDynamicValueChanged = false;
|
|
14619
14718
|
}
|
|
14620
14719
|
};
|
|
14720
|
+
DateTimePicker.prototype.updateLabelOverflowWidth = function () {
|
|
14721
|
+
var container = this.inputWrapper.container;
|
|
14722
|
+
var label = container.querySelector('.e-float-text.e-label-bottom');
|
|
14723
|
+
var width = 0;
|
|
14724
|
+
var iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
14725
|
+
var icons = container.querySelectorAll(iconSelectors);
|
|
14726
|
+
for (var index = 0; index < icons.length; index++) {
|
|
14727
|
+
width += icons[index].offsetWidth;
|
|
14728
|
+
}
|
|
14729
|
+
if (label) {
|
|
14730
|
+
var labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
14731
|
+
if (labelWidth) {
|
|
14732
|
+
label.style.width = labelWidth + "px";
|
|
14733
|
+
}
|
|
14734
|
+
}
|
|
14735
|
+
};
|
|
14736
|
+
DateTimePicker.prototype.clearLabelOverflowWidth = function () {
|
|
14737
|
+
var container = this.inputWrapper.container;
|
|
14738
|
+
var label = container.querySelector('.e-float-text.e-label-top');
|
|
14739
|
+
if (label) {
|
|
14740
|
+
label.removeAttribute('style');
|
|
14741
|
+
}
|
|
14742
|
+
};
|
|
14621
14743
|
/**
|
|
14622
14744
|
* To get component name.
|
|
14623
14745
|
*
|