When I set an number value to a TextField it automatically formats it like 125,455
How do I turn this globally off?
When I set an number value to a TextField it automatically formats it like 125,455
How do I turn this globally off?
Are you using converters to convert to/from text? If you are, the easiest may be write your own converter and set the pattern as needed.
Hi Simon,
It looks this auto formatting is not a default behavior for the Text/Number field. You could try it here https://vaadin.com/components/vaadin-text-field/java-examples
by searching some other docs, maybe the following pattern will help you.
TextField tf = new TextField();
tf.setPattern("[0-9]
*");
I used my own converter.
@Zhe Sun Thank you anyway!
Simon Martinelli:
I used my own converter.@Zhe Sun Thank you anyway!
I don’t know if it has anything to do with it, but as I’m running out of options, I’m asking everyone for help …
I have a textfield, I type in a numeric sequence (11111111111) … I would like separators to be included during typing, leaving this same numerical sequence as follows (111.111.111-11)
I’ve tried everything, textfieldFormatter, cleaver js …
Do you know anything that can help me?