priceFormat decimalPlaces

Hi, I’m wondering if there is an easy way to have different priceFormatters, ie: one for zero decimals and one for two decimals.

From what I can see, the priceFormat has a global setting in the i18n object:

  webix.i18n.priceSettings:{
     decimalSize:0     
  }  

I guess the easiest way would be to use numToString ?

Locale provides only one proce formatter but you can use numToStr to create your own formatting methods.

var format = webix.Number.numToStr({
  groupSize:3,
  decimalSize:2,
  groupDelimiter:" ",
  decimalDelimiter:"."
});
var priceFormat = function(val){ return "$"+format(val); };

thanks, yep, that’s what i did.