PDA

View Full Version : Ext.util.Format



Ronits
17 Jan 2014, 3:20 AM
Hi,
Do we have something like this in Ext util format library:

{format:"#,###.##"}

Thus, we can omit additional zeros in case the value is say, 1000.
The one that we currently have in Extjs, will return 1,000.00, even if the value is 1000, as we are formatting using {format:"0,000.00"}.
I need the value as 1,000 and not 1,000.00, if te raw value is 1000.

mdnaveed42
17 Jan 2014, 5:30 AM
Hi Ronits,


Ext.util.Format.currencySign = '';
Ext.util.Format.currency(1000, '', 0, false); // 1,000

Hope this works :)

Thanks,
Md Naveed