sergpy
January 11, 2016, 7:52am
1
Whow can I edit formatted number values (money, integer, percents …)??
Text elements reset values into the null or convert to the string value, and allows any sumbols on input
For example
http://www.igniteui.com/editors/currency-editor
http://www.igniteui.com/editors/percent-editor
Please, check those articles:
http://docs.webix.com/datatable__internationalization.html
http://docs.webix.com/desktop__data_validation.html
Moreover, the template can contain any html or a function.
To prevent the input of the string values, you can use the following code:
http://webix.com/snippet/ad4ae492
sergpy
January 20, 2016, 4:32pm
3
I know, but… Unfortunately, the answer is not satisfied (
I asked about form editors. Such as text or Counter
Helga
January 21, 2016, 5:24pm
4
Hi, this functionality is not yet implemented in Webix, but you can achieve it by some customization: http://webix.com/snippet/b744ff65
You need to differentiate between the formatted and raw value and set these values depending on the user action.
Although Webix since the original discussion includes a format option, this blog is still valid for custom or complex inputs.
But consider adding a method to clean up return values:
$getValue: function () {
return Number(this.getInputNode(this.node).value.replace(/[^\d.-]/g, ‘’));
},