How to set a custom thousands separator?

0 Answers 602 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

Roman
Top achievements
Rank 1
commented on 03 Oct 2024, 01:34 PM

Hello Georgi, i have a question on this, i have a service in my application that is switching the language of website (including this
(<CldrIntlService>this.intlService).localeId = language;
Also i have some kendo-numerictextbox in my project that need to be force set to USA currency format always, how can i achieve this.
Roman
Top achievements
Rank 1
commented on 03 Oct 2024, 01:34 PM

I'm using angular, if needed
Georgi
Telerik team
commented on 08 Oct 2024, 07:03 AM

Hi Roman,

Thank you very much for the details provided.

I noticed that a similar question has been asked in the following Forum thread, and a member of our team has already provided a response there:

With that being said, I would ask you in the future to ask questions on the same topic either in a single Forum thread or in a single private support ticket. This allows our team to better track support history and provide a better support service in general.

Thank you very much for your understanding.

Regards,
Georgi
Progress Telerik

No answers yet. Maybe you can help?

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