i found this solution for the smart-number-input but it does not work in grids with number cell editing.
// INPUT
<smart-number-input
id="etotartic"
[numberFormat]="{ style: 'currency', currency: 'EUR', minimumFractionDigits: 2 }"
(ngModelChange)="utilService.formatFunctionDotToComma('etotartic', entity.etotartic)">
</smart-number-input>
// FORMAT FUNCTION
public formatFunctionDotToComma(fieldId: string, value: any): void {
if (value !== ''){
const intValue = parseFloat(value);
document.getElementById(fieldId)?.setAttribute('value', intValue.toFixed(2).replace('.', ','));
}
}
-
This reply was modified 1 year, 11 months ago by
Rafa Esparza.