Skip to content

Commit eb29e1f

Browse files
author
pipeline
committed
v31.2.4 is released
1 parent e61f218 commit eb29e1f

File tree

161 files changed

+2359
-590
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+2359
-590
lines changed

controls/base/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
## 31.2.4 (2025-10-28)
6+
### Common
7+
#### Bug Fixes
8+
- `#768133` - Resolved a bug in the `processFraction` method that mishandled scientific notation which works fine for "5e-11" and improper for Decimal Cases like "5.7e-11".
9+
510
## 31.2.2 (2025-10-15)
611

712
### Common

controls/base/releasenotes/README.md

Lines changed: 0 additions & 183 deletions
This file was deleted.

controls/base/src/intl/number-formatter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ export class NumberFormat {
359359
}
360360

361361
private static processFraction(value: number, min: number, max: number, option ?: NumberFormatOptions): string {
362+
if (value != null && (value.toString().indexOf('e') !== -1 || value.toString().indexOf('E') !== -1)) {
363+
return value.toFixed(min);
364+
}
362365
const temp: string = (value + '').split('.')[1];
363366
const length: number = temp ? temp.length : 0;
364367
if (min && length < min) {

controls/calendars/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
## [Unreleased]
44

5-
## 31.2.3 (2025-10-22)
5+
## 31.2.4 (2025-10-28)
66

77
### DatePicker
88

99
#### Bug Fixes
1010

1111
- `#I765718` - Resolved an issue where the iPad keyboard would not open after selecting a date in the popup.
1212

13+
- `#I771080` - Fixed an issue where the float label text was overlapping with the icon of the DatePicker component when long text was used.
14+
1315
### DatePicker
1416

1517
#### Bug Fixes

controls/calendars/spec/datepicker/datepicker.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ describe('Datepicker', () => {
504504
datepicker = new DatePicker();
505505
datepicker.appendTo(element);
506506
datepicker.destroy();
507-
expect(element.getAttribute('tabindex') === null ).toBe(true);
507+
expect(element.getAttribute('tabindex') === '1' ).toBe(true);
508508
datepicker = null;
509509
});
510510
/**

controls/calendars/spec/daterangepicker/daterangepicker.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ describe('DateRangePicker', () => {
491491
daterangepicker = new DateRangePicker();
492492
daterangepicker.appendTo(element);
493493
daterangepicker.destroy();
494-
expect(element.getAttribute('tabindex') === null).toBe(true);
494+
expect(element.getAttribute('tabindex') === '1').toBe(true);
495495
daterangepicker = null;
496496
});
497497
it('inputFormats testing', () => {

controls/calendars/spec/timepicker/timepicker.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ describe('TimePicker', () => {
763763
timepicker = new TimePicker();
764764
timepicker.appendTo(element);
765765
timepicker.destroy();
766-
expect(element.getAttribute('tabindex') === null).toBe(true);
766+
expect(element.getAttribute('tabindex') === '1').toBe(true);
767767
timepicker = null;
768768
});
769769
});

controls/calendars/src/datepicker/datepicker.ts

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,7 @@ export class DatePicker extends Calendar implements IInput {
10791079
this.isDateIconClicked = false;
10801080
this.trigger('focus', focusArguments);
10811081
this.updateIconState();
1082+
this.clearFloatLabelOverflowWidth();
10821083
if (this.openOnFocus && !this.isIconClicked) {
10831084
this.show();
10841085
}
@@ -1104,6 +1105,7 @@ export class DatePicker extends Calendar implements IInput {
11041105
const dateSame: boolean = this.value && this.previousDate
11051106
? this.value.getTime() === this.previousDate.getTime()
11061107
: this.value === this.previousDate;
1108+
this.updateFloatLabelOverflowWidth();
11071109
if (!this.enabled || (inputSame && dateSame)) {
11081110
return;
11091111
}
@@ -1730,6 +1732,7 @@ export class DatePicker extends Calendar implements IInput {
17301732
} else {
17311733
this.inputWrapper.container.style.width = '100%';
17321734
}
1735+
this.updateFloatLabelOverflowWidth();
17331736
}
17341737
/* eslint-disable valid-jsdoc, jsdoc/require-param */
17351738
/**
@@ -2063,8 +2066,14 @@ export class DatePicker extends Calendar implements IInput {
20632066
if (this.inputFormats) {
20642067
this.checkInputFormats();
20652068
}
2066-
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
2067-
this.element.removeAttribute('tabindex');
2069+
if (this.ngTag !== null) {
2070+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
2071+
this.inputElement.removeAttribute('tabindex');
2072+
}
2073+
else {
2074+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
2075+
this.element.removeAttribute('tabindex');
2076+
}
20682077
super.preRender();
20692078
}
20702079
protected getDefaultKeyConfig(): { [key: string]: string } {
@@ -2249,6 +2258,29 @@ export class DatePicker extends Calendar implements IInput {
22492258
protected getModuleName(): string {
22502259
return 'datepicker';
22512260
}
2261+
private updateFloatLabelOverflowWidth(): void {
2262+
const container: HTMLElement = this.inputWrapper.container;
2263+
const label: HTMLElement = container.querySelector('.e-float-text.e-label-bottom');
2264+
let width: number = 0;
2265+
const iconSelectors: string = '.e-input-group-icon, .e-clear-icon';
2266+
const icons: NodeListOf<HTMLElement> = container.querySelectorAll(iconSelectors);
2267+
for (let index: number = 0; index < icons.length; index++) {
2268+
width += icons[index as number].offsetWidth;
2269+
}
2270+
if (label) {
2271+
const labelWidth: number = (this.element.parentElement.offsetWidth) - width;
2272+
if (labelWidth) {
2273+
label.style.width = `${labelWidth}px`;
2274+
}
2275+
}
2276+
}
2277+
private clearFloatLabelOverflowWidth(): void {
2278+
const container: HTMLElement = this.inputWrapper.container;
2279+
const label: HTMLElement = container.querySelector('.e-float-text.e-label-top');
2280+
if (label) {
2281+
label.removeAttribute('style');
2282+
}
2283+
}
22522284
private disabledDates(isDynamic: boolean = false, isBlur: boolean = false): void {
22532285
let formatOptions: DateFormatOptions;
22542286
let globalize: string;

controls/calendars/src/daterangepicker/daterangepicker.ts

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,14 @@ export class DateRangePicker extends CalendarBase {
828828
if (this.inputFormats) {
829829
this.checkInputFormats();
830830
}
831-
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
832-
this.element.removeAttribute('tabindex');
831+
if (this.angularTag !== null) {
832+
this.tabIndex = this.inputElement.hasAttribute('tabindex') ? this.inputElement.getAttribute('tabindex') : '0';
833+
this.inputElement.removeAttribute('tabindex');
834+
}
835+
else {
836+
this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';
837+
this.element.removeAttribute('tabindex');
838+
}
833839
super.preRender();
834840
this.navNextFunction = this.navNextMonth.bind(this);
835841
this.navPrevFunction = this.navPrevMonth.bind(this);
@@ -1553,6 +1559,7 @@ export class DateRangePicker extends CalendarBase {
15531559
this.trigger('focus', focusArguments);
15541560
}
15551561
this.updateClearIconState();
1562+
this.clearFloatLabelOverflowWidth();
15561563
if (this.openOnFocus && !this.preventFocus) {
15571564
this.preventFocus = true;
15581565
this.show();
@@ -1562,6 +1569,7 @@ export class DateRangePicker extends CalendarBase {
15621569
}
15631570

15641571
private inputBlurHandler(e: MouseEvent | KeyboardEvent): void {
1572+
this.updateFloatLabelOverflowWidth();
15651573
if (!this.enabled) {
15661574
return;
15671575
}
@@ -4078,6 +4086,7 @@ export class DateRangePicker extends CalendarBase {
40784086
} else {
40794087
this.inputWrapper.container.style.width = '100%';
40804088
}
4089+
this.updateFloatLabelOverflowWidth();
40814090
}
40824091

40834092
private adjustLongHeaderWidth(): void {
@@ -4568,6 +4577,29 @@ export class DateRangePicker extends CalendarBase {
45684577
protected getModuleName(): string {
45694578
return 'daterangepicker';
45704579
}
4580+
private updateFloatLabelOverflowWidth(): void {
4581+
const container: HTMLElement = this.inputWrapper.container;
4582+
const label: HTMLElement = container.querySelector('.e-float-text.e-label-bottom');
4583+
let width: number = 0;
4584+
const iconSelectors: string = '.e-input-group-icon, .e-clear-icon';
4585+
const icons: NodeListOf<HTMLElement> = container.querySelectorAll(iconSelectors);
4586+
for (let index: number = 0; index < icons.length; index++) {
4587+
width += icons[index as number].offsetWidth;
4588+
}
4589+
if (label) {
4590+
const labelWidth: number = (this.element.parentElement.offsetWidth) - width;
4591+
if (labelWidth) {
4592+
label.style.width = `${labelWidth}px`;
4593+
}
4594+
}
4595+
}
4596+
private clearFloatLabelOverflowWidth(): void {
4597+
const container: HTMLElement = this.inputWrapper.container;
4598+
const label: HTMLElement = container.querySelector('.e-float-text.e-label-top');
4599+
if (label) {
4600+
label.removeAttribute('style');
4601+
}
4602+
}
45714603
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
45724604
/**
45734605
* Return the properties that are maintained upon browser refresh.

0 commit comments

Comments
 (0)