I'm using ExtJS 5.1.1 an there is a big question about formatting the value.
For example a phone number i want to display the format (0000) 000 00 00-00
For an double I wanna use the format 1.000.000,10.
The last example works - just only in the console
xtype: 'textfield',
enableKeyEvents: true,
thousandSeparator : '.',
decimalSeparator : ',',
fieldLabel: "numberfield",
decimalPrecision: 2,
listeners:{
keyup: function(field){
var val = field.getValue(),
formatter = Ext.util.Format;
Ext.util.Format.currencyAtEnd= true;
Ext.util.Format.thousandSeparator = '.';
Ext.util.Format.decimalSeparator = ',';
output = Ext.util.Format.number(val,'0.000,00');
console.info(output);
}
}
Does anyone can give me a hint, where the problem can be?
Michael