Price Format with Proper Alignment

Hi, is there a predefined function or any better method to display the value in text field with price format: Number right align, but the currency sign is left aligned?

Hi,

There isn’t any way to align parts of text in the input field, but you can achieve the required functionality by combining a field icon (replaced by the needed currency sign in the CSS) and numberFormat for the input value.

Check the snippet, please: https://snippet.webix.com/nbhadawh

@Helga Thanks a lot… That is what I am looking for. I never think of make the currency format become icon. That is a nice work around

@Helga After I added in the label, I found the position of the currency format is run of. How could we detect the labelwidth in the css?

Due to HTML markup of controls’ icons it’s impossible to position left-hand icons with respect to a control’s label.

As a solution, you can use a separate label placed to the left of your text field (and add the position:relative rule to the field itself): https://snippet.webix.com/j8vv5vzm