Removing formatting by kendo-numerictextbox

1 Answer 299 Views
NumericTextBox
Daniel
Top achievements
Rank 1
Daniel asked on 11 May 2021, 02:40 PM

By default the kendo-numerictext box uses the "n3" format. Is there any way to disable formatting? I would like the number displayed to be the number entered by the user. 

Thanks!

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 14 May 2021, 07:28 AM

Hello Daniel,

Actually, the default NumericTextBox format is "n3", but it can be customized by the format option:

https://www.telerik.com/kendo-angular-ui/components/inputs/numerictextbox/formats/

A list of the supported standard and custom formats can be found in the kendo-intl GitHub repo:

https://github.com/telerik/kendo-intl/blob/master/docs/num-formatting/index.md#custom

For example, to keep the number, entered by the user without additional formatting, the developer can use the "#" and "." (decimal separator) placeholders:

https://stackblitz.com/edit/angular-7wb9lm-yxdfyv?file=app/app.component.ts

The number of allowed digits after the placeholder can vary, but the JavaScript numbers standard limitation due to storing numbers in double-precision IEEE 754 format still applies, so the respective limitations of correctly representing the user-entered number still apply.

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
NumericTextBox
Asked by
Daniel
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or