Skip to content

Commit 03d5797

Browse files
author
pipeline
committed
feature(EJ2-1928): NumericTextBox floating label changes have been committed into angular sb.
1 parent 3b2eeb0 commit 03d5797

File tree

3 files changed

+35
-31
lines changed

3 files changed

+35
-31
lines changed

src/numerictextbox/format.html

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
<div class="control-section">
22
<div class="content-wrapper">
3-
<div>
4-
<div class="control-label">Kilometers</div>
3+
<div class="wrapper">
54
<ej-numerictextbox placeholder="Enter the distance" value="250" format="###.### km" min="0"></ej-numerictextbox>
65
</div>
7-
<div>
8-
<div class="control-label">Service Tax</div>
6+
<div class="wrapper">
97
<ej-numerictextbox placeholder="Enter the tax" value="25" format="### '%'" min="0" max="100"></ej-numerictextbox>
108
</div>
11-
<div>
12-
<div class="control-label">Fare</div>
9+
<div class="wrapper">
1310
<ej-numerictextbox placeholder="Enter the amount" value="1025" format="$ ###.##" min="0"></ej-numerictextbox>
1411
</div>
1512
</div>
@@ -28,10 +25,9 @@
2825
margin: 0 auto;
2926
min-width: 185px;
3027
}
31-
32-
.control-label {
33-
padding: 24px 0px 0px 0px;
34-
font-size: 12px;
35-
opacity: 0.54;
28+
29+
.wrapper {
30+
margin-top: 40px;
3631
}
32+
3733
</style>

src/numerictextbox/internationalization.component.ts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
import { Component } from '@angular/core';
1+
import { Component, ViewChild } from '@angular/core';
22
import { loadCldr, L10n } from '@syncfusion/ej2-base';
3+
import { NumericTextBoxComponent } from '@syncfusion/ej2-ng-inputs';
34

45
@Component({
56
selector: 'control-content',
67
templateUrl: 'internationalization.html',
78
})
89
export class InternationalizationController {
10+
@ViewChild('numeric')
11+
public numeric: NumericTextBoxComponent;
12+
@ViewChild('percentage')
13+
public percentage: NumericTextBoxComponent;
14+
@ViewChild('currencyTextBox')
15+
public currencyTextBox: NumericTextBoxComponent;
916
locale: string = 'de';
1017
currency: string = 'EUR';
1118
numericValue: number = 10;
@@ -18,20 +25,17 @@ export class InternationalizationController {
1825
L10n.load({
1926
'en': {
2027
'numerictextbox': {
21-
incrementTitle: 'Increment value', decrementTitle: 'Decrement value',
22-
placeholder: 'Enter the value'
28+
incrementTitle: 'Increment value', decrementTitle: 'Decrement value'
2329
}
2430
},
2531
'de': {
2632
'numerictextbox': {
27-
incrementTitle: 'Wert erhöhen', decrementTitle: 'Dekrementwert',
28-
placeholder: 'Geben Sie den Wert ein'
33+
incrementTitle: 'Wert erhöhen', decrementTitle: 'Dekrementwert'
2934
}
3035
},
3136
'zh': {
3237
'numerictextbox': {
33-
incrementTitle: '增值', decrementTitle: '遞減值',
34-
placeholder: '輸入值'
38+
incrementTitle: '增值', decrementTitle: '遞減值'
3539
}
3640
}
3741
});
@@ -49,10 +53,19 @@ export class InternationalizationController {
4953
this.locale = culture;
5054
if (culture === 'zh') {
5155
this.currency = 'CNY';
56+
this.numeric.placeholder = '输入值';
57+
this.currencyTextBox.placeholder = '输入货币';
58+
this.percentage.placeholder = '输入百分比';
5259
} else if (culture === 'de') {
5360
this.currency = 'EUR';
61+
this.numeric.placeholder = 'Geben Sie den Wert ein';
62+
this.currencyTextBox.placeholder = 'Geben Sie die Währung ein';
63+
this.percentage.placeholder = 'Geben Sie den Prozentsatz ein';
5464
} else {
5565
this.currency = 'USD';
66+
this.numeric.placeholder = 'Enter the value';
67+
this.currencyTextBox.placeholder = 'Enter the currency';
68+
this.percentage.placeholder = 'Enter the percentage';
5669
}
5770
}
5871
constructor() { }

src/numerictextbox/internationalization.html

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
<div class="control-section">
22
<div class="col-lg-8 content-wrapper">
33
<div class="content">
4-
<div>
5-
<div class="control-label">Numeric TextBox</div>
6-
<ej-numerictextbox [value]="numericValue" [locale]="locale" ></ej-numerictextbox>
4+
<div class="wrapper">
5+
<ej-numerictextbox #numeric [value]="numericValue" placeholder="Geben Sie den Wert ein" [locale]="locale" ></ej-numerictextbox>
76
</div>
8-
<div>
9-
<div class="control-label">Percentage TextBox</div>
10-
<ej-numerictextbox format="p2" [value]="percentValue" [min]="min" [max]="max" [step]="step" [locale]="locale"></ej-numerictextbox>
7+
<div class="wrapper">
8+
<ej-numerictextbox #percentage format="p2" placeholder="Geben Sie den Prozentsatz ein" [value]="percentValue" [min]="min" [max]="max" [step]="step" [locale]="locale"></ej-numerictextbox>
119
</div>
12-
<div>
13-
<div class="control-label">Currency TextBox</div>
14-
<ej-numerictextbox format="c2" [value]="currencyValue" [locale]="locale" [currency]="currency" ></ej-numerictextbox>
10+
<div class='wrapper'>
11+
<ej-numerictextbox #currencyTextBox format="c2" placeholder="Geben Sie die Währung ein" [value]="currencyValue" [locale]="locale" [currency]="currency" ></ej-numerictextbox>
1512
</div>
1613
</div>
1714
</div>
@@ -58,10 +55,8 @@
5855
padding: 20px 0px;
5956
}
6057

61-
.control-label {
62-
padding: 24px 0px 0px 0px;
63-
font-size: 12px;
64-
opacity: 0.54;
58+
.wrapper {
59+
margin-top: 40px;
6560
}
6661

6762
</style>

0 commit comments

Comments
 (0)