NzInputNumberComponent European number insert
See original GitHub issueWhat problem does this feature solve?
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
What does the proposed API look like?
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}`;
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
InputNumber | NG-ZORRO - Ant Design
Angular InputNumber Component, Enter a number within certain range with the mouse or keyboard.When a numeric value needs to be provided.You can get...
Read more >InputNumber | NG-ZORRO
Angular InputNumber Component, Enter a number within certain range with the mouse or keyboard.When a numeric value needs to be provided.You can get...
Read more >Change number format of input field in Antd's table-row-edit ...
I understand that the table-component encapsulates an Input-Number component which has the parameter decimalSeparator which I have to adjust. It ...
Read more >Startup Tasks and Input Arguments in App Designer
To create a startupFcn callback, right-click the app node from the top of the Component Browser hierarchy, and select Callbacks > Add StartupFcn...
Read more >Add headers, footers, and Bates numbering to PDFs
To search for Bates-numbered PDFs in a PDF Portfolio, open the PDF Portfolio and enter all or part of the Bates number in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@vthinkxie 3,000 means 3 basically (I’m from Italy).
Numbers are even stranger in India.