How to set a custom thousands separator?

0 Answers 193 Views
NumericTextBox
Dmitry
Top achievements
Rank 1
Dmitry asked on 13 Oct 2023, 03:19 AM

I want to display the number in the following format

1000000 => 1 000 000

<kendo-numerictextbox id="quota"
[min]="-1000000"
[max]="1000000"
[decimals]="0"
[format]="'n0'"
[autoCorrect]="true"
/>

What needs to be done for this?

Georgi
Telerik team
commented on 17 Oct 2023, 10:47 AM

Hi Dmitry, 

Thank you very much for the details provided.

One possible approach that would allow you to modify the default formats and patterns of a specific locale would be to get the data of the locale using the localeData() method and adjust it according to the case-specific requirements:

https://www.telerik.com/kendo-angular-ui/components/globalization/internationalization/loading-data/#toc-modifying-the-locale-data

To better illustrate the suggested approach, I am sending you a StackBlitz demo that demonstrates how to modify the default decimal and thousand separator of the en locale: 

https://stackblitz.com/edit/angular-dv4mzg

I hope this helps. 

Regards,

Georgi

Progress Telerik

No answers yet. Maybe you can help?

Tags
NumericTextBox
Asked by
Dmitry
Top achievements
Rank 1
Share this question
or