@syncfusion/ej2-calendars 34.2.5 → 34.2.6
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 +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 +27 -4
- package/dist/es6/ej2-calendars.es2015.js.map +1 -1
- package/dist/es6/ej2-calendars.es5.js +27 -4
- 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 +6 -6
- package/src/datepicker/datepicker.d.ts +2 -0
- package/src/datepicker/datepicker.js +15 -2
- package/src/daterangepicker/daterangepicker.d.ts +2 -0
- package/src/daterangepicker/daterangepicker.js +12 -2
|
@@ -3706,6 +3706,8 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3706
3706
|
keyAction: this.inputKeyActionHandle.bind(this),
|
|
3707
3707
|
keyConfigs: this.defaultKeyConfigs
|
|
3708
3708
|
});
|
|
3709
|
+
this.resizeHandler = this.windowResize.bind(this);
|
|
3710
|
+
window.addEventListener('resize', this.resizeHandler);
|
|
3709
3711
|
}
|
|
3710
3712
|
keydownHandler(e) {
|
|
3711
3713
|
switch (e.code) {
|
|
@@ -3747,6 +3749,10 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3747
3749
|
if (this.formElement) {
|
|
3748
3750
|
EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);
|
|
3749
3751
|
}
|
|
3752
|
+
if (this.resizeHandler) {
|
|
3753
|
+
window.removeEventListener('resize', this.resizeHandler);
|
|
3754
|
+
this.resizeHandler = null;
|
|
3755
|
+
}
|
|
3750
3756
|
}
|
|
3751
3757
|
resetFormHandler() {
|
|
3752
3758
|
if (!this.enabled) {
|
|
@@ -3837,6 +3843,9 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3837
3843
|
updateInputValue(value) {
|
|
3838
3844
|
Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);
|
|
3839
3845
|
}
|
|
3846
|
+
windowResize() {
|
|
3847
|
+
this.updateFloatLabelOverflowWidth(true);
|
|
3848
|
+
}
|
|
3840
3849
|
dateIconHandler(e) {
|
|
3841
3850
|
if (!this.enabled) {
|
|
3842
3851
|
return;
|
|
@@ -5188,13 +5197,17 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
5188
5197
|
}
|
|
5189
5198
|
return document.body;
|
|
5190
5199
|
}
|
|
5191
|
-
updateFloatLabelOverflowWidth() {
|
|
5200
|
+
updateFloatLabelOverflowWidth(isDynamic) {
|
|
5192
5201
|
const container = this.inputWrapper.container;
|
|
5193
|
-
const label =
|
|
5202
|
+
const label = isDynamic ?
|
|
5203
|
+
container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
|
|
5194
5204
|
let width = 0;
|
|
5195
5205
|
const iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
5196
5206
|
const icons = container.querySelectorAll(iconSelectors);
|
|
5197
5207
|
for (let index = 0; index < icons.length; index++) {
|
|
5208
|
+
if (isDynamic && icons[index].classList.contains('e-time-icon')) {
|
|
5209
|
+
continue;
|
|
5210
|
+
}
|
|
5198
5211
|
width += icons[index].offsetWidth;
|
|
5199
5212
|
}
|
|
5200
5213
|
if (label) {
|
|
@@ -6133,6 +6146,8 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6133
6146
|
else {
|
|
6134
6147
|
this.inputElement.tabIndex = -1;
|
|
6135
6148
|
}
|
|
6149
|
+
this.resizeHandler = this.windowResize.bind(this);
|
|
6150
|
+
window.addEventListener('resize', this.resizeHandler);
|
|
6136
6151
|
}
|
|
6137
6152
|
unBindEvents() {
|
|
6138
6153
|
EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.rangeIconHandler);
|
|
@@ -6151,6 +6166,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6151
6166
|
EventHandler.remove(this.formElement, 'reset', this.formResetHandler);
|
|
6152
6167
|
}
|
|
6153
6168
|
this.inputElement.tabIndex = -1;
|
|
6169
|
+
if (this.resizeHandler) {
|
|
6170
|
+
window.removeEventListener('resize', this.resizeHandler);
|
|
6171
|
+
this.resizeHandler = null;
|
|
6172
|
+
}
|
|
6154
6173
|
}
|
|
6155
6174
|
updateHiddenInput() {
|
|
6156
6175
|
if (this.firstHiddenChild && this.secondHiddenChild) {
|
|
@@ -6269,6 +6288,9 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6269
6288
|
}
|
|
6270
6289
|
this.removeSelection();
|
|
6271
6290
|
}
|
|
6291
|
+
windowResize() {
|
|
6292
|
+
this.updateFloatLabelOverflowWidth(true);
|
|
6293
|
+
}
|
|
6272
6294
|
rangeIconHandler(e) {
|
|
6273
6295
|
if (!this.enabled) {
|
|
6274
6296
|
return;
|
|
@@ -9689,9 +9711,10 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9689
9711
|
}
|
|
9690
9712
|
return document.body;
|
|
9691
9713
|
}
|
|
9692
|
-
updateFloatLabelOverflowWidth() {
|
|
9714
|
+
updateFloatLabelOverflowWidth(isDynamic) {
|
|
9693
9715
|
const container = this.inputWrapper.container;
|
|
9694
|
-
const label =
|
|
9716
|
+
const label = isDynamic ?
|
|
9717
|
+
container.querySelector('.e-float-text') : container.querySelector('.e-float-text.e-label-bottom');
|
|
9695
9718
|
let width = 0;
|
|
9696
9719
|
const iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
9697
9720
|
const icons = container.querySelectorAll(iconSelectors);
|