Hi There,
how would i implement a localized numberField in a form, that formats numbers with the proper amount of digits, the right decimalSeparator etc.?
right now I’m using
`{
view: 'text',
name: 'price',
label: 'Preis',
on: {
onChange: formatNumber
},
validateEvent: 'key'
}`
where formatNumber is defined:
` function formatNumber (newV /*, oldV */) {
if ($.isNumeric(newV)) {
this.setValue(webix.i18n.numberFormat(newV));
}
}`
this is (the relevant part of) my locale:
` webix.i18n.locales["de-DE"] = {
groupDelimiter:".",
groupSize:3,
decimalDelimiter:",",
decimalSize:2
};`
annoying:
when i access the form values/data, i don’t get the actual numeric value, but the formatted string. Plus: even if the actual value hasn’t changed, it will get marked dirty by the form.