Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to format ui-textbox number value? #452

Open
madatan opened this issue Jul 23, 2019 · 1 comment
Open

How to format ui-textbox number value? #452

madatan opened this issue Jul 23, 2019 · 1 comment

Comments

@madatan
Copy link

madatan commented Jul 23, 2019

Hi,
I am using ui-textbox for number input and I need to apply a format, e.g.

for 2000000.23 I want to be displayed as 2,000,000.23

How can I achieve this? I couldn't find any prop for format. Also, I need the binding value to be kept as numeric, because I use it for numeric operations.

Thanks in advance!

@JosephusPaye
Copy link
Owner

Hi @madatan,

Unfortunately, UiTextbox doesn't currently support formatting the displayed value.

This would be non-trivial, because, as you mention, we'll need to keep the raw input for the binding while showing a different formatted value.

Would it suit you use-case if you just show the formatted value somewhere next to the textbox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants