Suffix in ionic2 number input


#1

Is it actually possible to add a suffix in to a ionic number input?
I have tried to mask it with a directive but the number type validator returned errors.


#2

How exactly should this look like or work?


#3

I just want to show the units such as gallon, meters, etc on the right side within the number input field. As example: 1.111 gal


#4

What does you input look like? I would probably try to position a “label” right to the input and make it look the way I want.


#5

Yes thats what i actually did. But a suffix in the number field looks better :slight_smile:


#6

Can you provide a screenshot? Maybe we can provide instructions to improve the display.


#7

thats how it looks right now:


#8

Think a vertical grid line between the values and the units. Then leftalign the unit texts (and make them less bold), right-align the values. Done. Still no text in the actual input field, but better grouping and visual hierarchy.