You can change Calx’s default behavior as you want by overriding default configuration value. The default configuration value comes with Calx is:


By default, calx will use 0[.]00 as the default format, you can override it to another format as you want


The only language defined for number formatting is ‘en’, and it’s loaded by default, where it uses comma [,] as thousands delimiter, dot [.] as decimal delimiter, and dollar sign [$] as currency symbol.

To register your own language settings, simply call the Calx language method

After new language settings was registered, you can call it when initializing the Calx:


By default, autocalculate value is true, it tells the Calx to trigger calculation automatically when form element ‘change’ event is triggered, to disable this, simply set the autocalculate value to be false

when the autocalculate value is false, no calculation result will be displayed when you change the form element value, until you call the Calx ‘update’ method


By default, Calx will mark all input element with data-formula attribute as readonly, you can change this default behavior by setting readonly value to be false


When text box get focused, it will display it’s original value instead of formatted one which is usually float number with a lot of decimal digits. Since version 1.1.9 this behaviour can be controlled by round config to limit the number of decimal digits displayed when text box get focused