@syncfusion/ej2-calendars 31.2.3 → 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 +3 -3
- 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
|
@@ -3933,6 +3933,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3933
3933
|
this.isDateIconClicked = false;
|
|
3934
3934
|
this.trigger('focus', focusArguments);
|
|
3935
3935
|
this.updateIconState();
|
|
3936
|
+
this.clearFloatLabelOverflowWidth();
|
|
3936
3937
|
if (this.openOnFocus && !this.isIconClicked) {
|
|
3937
3938
|
this.show();
|
|
3938
3939
|
}
|
|
@@ -3957,6 +3958,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
3957
3958
|
const dateSame = this.value && this.previousDate
|
|
3958
3959
|
? this.value.getTime() === this.previousDate.getTime()
|
|
3959
3960
|
: this.value === this.previousDate;
|
|
3961
|
+
this.updateFloatLabelOverflowWidth();
|
|
3960
3962
|
if (!this.enabled || (inputSame && dateSame)) {
|
|
3961
3963
|
return;
|
|
3962
3964
|
}
|
|
@@ -4584,6 +4586,7 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4584
4586
|
else {
|
|
4585
4587
|
this.inputWrapper.container.style.width = '100%';
|
|
4586
4588
|
}
|
|
4589
|
+
this.updateFloatLabelOverflowWidth();
|
|
4587
4590
|
}
|
|
4588
4591
|
/* eslint-disable valid-jsdoc, jsdoc/require-param */
|
|
4589
4592
|
/**
|
|
@@ -4923,8 +4926,14 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
4923
4926
|
if (this.inputFormats) {
|
|
4924
4927
|
this.checkInputFormats();
|
|
4925
4928
|
}
|
|
4926
|
-
|
|
4927
|
-
|
|
4929
|
+
if (this.ngTag !== null) {
|
|
4930
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
4931
|
+
this.inputElement.removeAttribute('tabindex');
|
|
4932
|
+
}
|
|
4933
|
+
else {
|
|
4934
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
4935
|
+
this.element.removeAttribute('tabindex');
|
|
4936
|
+
}
|
|
4928
4937
|
super.preRender();
|
|
4929
4938
|
}
|
|
4930
4939
|
getDefaultKeyConfig() {
|
|
@@ -5119,6 +5128,29 @@ let DatePicker = class DatePicker extends Calendar {
|
|
|
5119
5128
|
getModuleName() {
|
|
5120
5129
|
return 'datepicker';
|
|
5121
5130
|
}
|
|
5131
|
+
updateFloatLabelOverflowWidth() {
|
|
5132
|
+
const container = this.inputWrapper.container;
|
|
5133
|
+
const label = container.querySelector('.e-float-text.e-label-bottom');
|
|
5134
|
+
let width = 0;
|
|
5135
|
+
const iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
5136
|
+
const icons = container.querySelectorAll(iconSelectors);
|
|
5137
|
+
for (let index = 0; index < icons.length; index++) {
|
|
5138
|
+
width += icons[index].offsetWidth;
|
|
5139
|
+
}
|
|
5140
|
+
if (label) {
|
|
5141
|
+
const labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
5142
|
+
if (labelWidth) {
|
|
5143
|
+
label.style.width = `${labelWidth}px`;
|
|
5144
|
+
}
|
|
5145
|
+
}
|
|
5146
|
+
}
|
|
5147
|
+
clearFloatLabelOverflowWidth() {
|
|
5148
|
+
const container = this.inputWrapper.container;
|
|
5149
|
+
const label = container.querySelector('.e-float-text.e-label-top');
|
|
5150
|
+
if (label) {
|
|
5151
|
+
label.removeAttribute('style');
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5122
5154
|
disabledDates(isDynamic = false, isBlur = false) {
|
|
5123
5155
|
let formatOptions;
|
|
5124
5156
|
let globalize;
|
|
@@ -5690,8 +5722,14 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
5690
5722
|
if (this.inputFormats) {
|
|
5691
5723
|
this.checkInputFormats();
|
|
5692
5724
|
}
|
|
5693
|
-
|
|
5694
|
-
|
|
5725
|
+
if (this.angularTag !== null) {
|
|
5726
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
5727
|
+
this.inputElement.removeAttribute('tabindex');
|
|
5728
|
+
}
|
|
5729
|
+
else {
|
|
5730
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
5731
|
+
this.element.removeAttribute('tabindex');
|
|
5732
|
+
}
|
|
5695
5733
|
super.preRender();
|
|
5696
5734
|
this.navNextFunction = this.navNextMonth.bind(this);
|
|
5697
5735
|
this.navPrevFunction = this.navPrevMonth.bind(this);
|
|
@@ -6430,6 +6468,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6430
6468
|
this.trigger('focus', focusArguments);
|
|
6431
6469
|
}
|
|
6432
6470
|
this.updateClearIconState();
|
|
6471
|
+
this.clearFloatLabelOverflowWidth();
|
|
6433
6472
|
if (this.openOnFocus && !this.preventFocus) {
|
|
6434
6473
|
this.preventFocus = true;
|
|
6435
6474
|
this.show();
|
|
@@ -6439,6 +6478,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
6439
6478
|
}
|
|
6440
6479
|
}
|
|
6441
6480
|
inputBlurHandler(e) {
|
|
6481
|
+
this.updateFloatLabelOverflowWidth();
|
|
6442
6482
|
if (!this.enabled) {
|
|
6443
6483
|
return;
|
|
6444
6484
|
}
|
|
@@ -9020,6 +9060,7 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9020
9060
|
else {
|
|
9021
9061
|
this.inputWrapper.container.style.width = '100%';
|
|
9022
9062
|
}
|
|
9063
|
+
this.updateFloatLabelOverflowWidth();
|
|
9023
9064
|
}
|
|
9024
9065
|
adjustLongHeaderWidth() {
|
|
9025
9066
|
if (this.dayHeaderFormat === 'Wide') {
|
|
@@ -9528,6 +9569,29 @@ let DateRangePicker = class DateRangePicker extends CalendarBase {
|
|
|
9528
9569
|
getModuleName() {
|
|
9529
9570
|
return 'daterangepicker';
|
|
9530
9571
|
}
|
|
9572
|
+
updateFloatLabelOverflowWidth() {
|
|
9573
|
+
const container = this.inputWrapper.container;
|
|
9574
|
+
const label = container.querySelector('.e-float-text.e-label-bottom');
|
|
9575
|
+
let width = 0;
|
|
9576
|
+
const iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
9577
|
+
const icons = container.querySelectorAll(iconSelectors);
|
|
9578
|
+
for (let index = 0; index < icons.length; index++) {
|
|
9579
|
+
width += icons[index].offsetWidth;
|
|
9580
|
+
}
|
|
9581
|
+
if (label) {
|
|
9582
|
+
const labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
9583
|
+
if (labelWidth) {
|
|
9584
|
+
label.style.width = `${labelWidth}px`;
|
|
9585
|
+
}
|
|
9586
|
+
}
|
|
9587
|
+
}
|
|
9588
|
+
clearFloatLabelOverflowWidth() {
|
|
9589
|
+
const container = this.inputWrapper.container;
|
|
9590
|
+
const label = container.querySelector('.e-float-text.e-label-top');
|
|
9591
|
+
if (label) {
|
|
9592
|
+
label.removeAttribute('style');
|
|
9593
|
+
}
|
|
9594
|
+
}
|
|
9531
9595
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
9532
9596
|
/**
|
|
9533
9597
|
* Return the properties that are maintained upon browser refresh.
|
|
@@ -10349,8 +10413,6 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10349
10413
|
this.inputElement = this.createElement('input');
|
|
10350
10414
|
this.element.appendChild(this.inputElement);
|
|
10351
10415
|
}
|
|
10352
|
-
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
10353
|
-
this.element.removeAttribute('tabindex');
|
|
10354
10416
|
this.openPopupEventArgs = {
|
|
10355
10417
|
appendTo: document.body
|
|
10356
10418
|
};
|
|
@@ -10473,6 +10535,14 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10473
10535
|
const localeText = { placeholder: this.placeholder };
|
|
10474
10536
|
this.l10n = new L10n('timepicker', localeText, this.locale);
|
|
10475
10537
|
this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);
|
|
10538
|
+
if (this.angularTag !== null) {
|
|
10539
|
+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
|
|
10540
|
+
this.inputElement.removeAttribute('tabindex');
|
|
10541
|
+
}
|
|
10542
|
+
else {
|
|
10543
|
+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
|
|
10544
|
+
this.element.removeAttribute('tabindex');
|
|
10545
|
+
}
|
|
10476
10546
|
this.initValue = this.checkDateValue(this.value);
|
|
10477
10547
|
this.initMin = this.checkDateValue(this.min);
|
|
10478
10548
|
this.initMax = this.checkDateValue(this.max);
|
|
@@ -10543,6 +10613,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
10543
10613
|
buttons: [' e-input-group-icon e-time-icon e-icons']
|
|
10544
10614
|
}, this.createElement);
|
|
10545
10615
|
this.inputWrapper.container.style.width = this.setWidth(this.width);
|
|
10616
|
+
this.updateFloatLabelOverflowWidth();
|
|
10546
10617
|
attributes(this.inputElement, {
|
|
10547
10618
|
'aria-autocomplete': 'list', 'tabindex': '0',
|
|
10548
10619
|
'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',
|
|
@@ -12267,6 +12338,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12267
12338
|
this.checkValueChange(null, false);
|
|
12268
12339
|
}
|
|
12269
12340
|
inputBlurHandler(e) {
|
|
12341
|
+
this.updateFloatLabelOverflowWidth();
|
|
12270
12342
|
if (!this.enabled) {
|
|
12271
12343
|
return;
|
|
12272
12344
|
}
|
|
@@ -12341,6 +12413,7 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12341
12413
|
}
|
|
12342
12414
|
this.trigger('focus', focusArguments);
|
|
12343
12415
|
this.clearIconState();
|
|
12416
|
+
this.clearFloatLabelOverflowWidth();
|
|
12344
12417
|
if (this.openOnFocus) {
|
|
12345
12418
|
this.show();
|
|
12346
12419
|
}
|
|
@@ -12524,6 +12597,29 @@ let TimePicker = class TimePicker extends Component {
|
|
|
12524
12597
|
getModuleName() {
|
|
12525
12598
|
return 'timepicker';
|
|
12526
12599
|
}
|
|
12600
|
+
updateFloatLabelOverflowWidth() {
|
|
12601
|
+
const container = this.inputWrapper.container;
|
|
12602
|
+
const label = container.querySelector('.e-float-text.e-label-bottom');
|
|
12603
|
+
let width = 0;
|
|
12604
|
+
const iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
12605
|
+
const icons = container.querySelectorAll(iconSelectors);
|
|
12606
|
+
for (let index = 0; index < icons.length; index++) {
|
|
12607
|
+
width += icons[index].offsetWidth;
|
|
12608
|
+
}
|
|
12609
|
+
if (label) {
|
|
12610
|
+
const labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
12611
|
+
if (labelWidth) {
|
|
12612
|
+
label.style.width = `${labelWidth}px`;
|
|
12613
|
+
}
|
|
12614
|
+
}
|
|
12615
|
+
}
|
|
12616
|
+
clearFloatLabelOverflowWidth() {
|
|
12617
|
+
const container = this.inputWrapper.container;
|
|
12618
|
+
const label = container.querySelector('.e-float-text.e-label-top');
|
|
12619
|
+
if (label) {
|
|
12620
|
+
label.removeAttribute('style');
|
|
12621
|
+
}
|
|
12622
|
+
}
|
|
12527
12623
|
/**
|
|
12528
12624
|
* Called internally if any of the property value changed.
|
|
12529
12625
|
*
|
|
@@ -12871,6 +12967,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12871
12967
|
this.dateTimeOptions = options;
|
|
12872
12968
|
}
|
|
12873
12969
|
focusHandler() {
|
|
12970
|
+
this.clearLabelOverflowWidth();
|
|
12874
12971
|
if (!this.enabled) {
|
|
12875
12972
|
return;
|
|
12876
12973
|
}
|
|
@@ -12896,6 +12993,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
12896
12993
|
}
|
|
12897
12994
|
}
|
|
12898
12995
|
blurHandler(e) {
|
|
12996
|
+
this.updateLabelOverflowWidth();
|
|
12899
12997
|
if (!this.enabled) {
|
|
12900
12998
|
return;
|
|
12901
12999
|
}
|
|
@@ -13188,6 +13286,7 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
13188
13286
|
addClass([this.inputWrapper.container], DATETIMEWRAPPER);
|
|
13189
13287
|
addClass([this.inputElement], ROOT$4);
|
|
13190
13288
|
this.renderTimeIcon();
|
|
13289
|
+
this.updateLabelOverflowWidth();
|
|
13191
13290
|
}
|
|
13192
13291
|
renderTimeIcon() {
|
|
13193
13292
|
this.timeIcon = Input.appendSpan(INPUTWRAPPER$1 + ' ' + TIMEICON + ' ' + ICONS$1, this.inputWrapper.container);
|
|
@@ -14464,6 +14563,29 @@ let DateTimePicker = class DateTimePicker extends DatePicker {
|
|
|
14464
14563
|
this.isDynamicValueChanged = false;
|
|
14465
14564
|
}
|
|
14466
14565
|
}
|
|
14566
|
+
updateLabelOverflowWidth() {
|
|
14567
|
+
const container = this.inputWrapper.container;
|
|
14568
|
+
const label = container.querySelector('.e-float-text.e-label-bottom');
|
|
14569
|
+
let width = 0;
|
|
14570
|
+
const iconSelectors = '.e-input-group-icon, .e-clear-icon';
|
|
14571
|
+
const icons = container.querySelectorAll(iconSelectors);
|
|
14572
|
+
for (let index = 0; index < icons.length; index++) {
|
|
14573
|
+
width += icons[index].offsetWidth;
|
|
14574
|
+
}
|
|
14575
|
+
if (label) {
|
|
14576
|
+
const labelWidth = (this.element.parentElement.offsetWidth) - width;
|
|
14577
|
+
if (labelWidth) {
|
|
14578
|
+
label.style.width = `${labelWidth}px`;
|
|
14579
|
+
}
|
|
14580
|
+
}
|
|
14581
|
+
}
|
|
14582
|
+
clearLabelOverflowWidth() {
|
|
14583
|
+
const container = this.inputWrapper.container;
|
|
14584
|
+
const label = container.querySelector('.e-float-text.e-label-top');
|
|
14585
|
+
if (label) {
|
|
14586
|
+
label.removeAttribute('style');
|
|
14587
|
+
}
|
|
14588
|
+
}
|
|
14467
14589
|
/**
|
|
14468
14590
|
* To get component name.
|
|
14469
14591
|
*
|