In most European countries, a comma is used to separate the integral part of a number from the decimal part. This means, for example, that three hundred euros and ten cents is written as 300,10 - with a comma as a decimal marker.
It's not possible to insert a number like 10,5 - the value in this case is 105 because the comma is not allowed
export class NzInputNumberComponent implements ControlValueAccessor, AfterViewInit, OnChanges, OnInit, OnDestroy {
onModelChange(value: string): void {
this.actualValue = this.nzParser(
value
.trim()
.replace(/。/g, '.')
.replace(/,/g, '.') <--------------[add this replace]
.replace(/[^\w\.-] /g, '')
);
this.inputElement.nativeElement.value = `${this.actualValue}`;
}
}
@feirer but what is 3,000 means in European countries, should it translate to 3000 or 3.000
@vthinkxie 3,000 means 3 basically (I'm from Italy).
_See_
Numbers are even stranger in India.
Hi all, you can override the default nzParser after v9 released
Most helpful comment
Numbers are even stranger in India.