kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

NumericTextBox trailing decimal zeros get cut off when going over the decimal limit.

Open MidasLamb opened this issue 6 years ago • 5 comments
trafficstars

Bug Description In a NumericTextBox, when the amount of decimals is limited (so a Fraction Length), trailing decimal zeros get cut off when going over the allowed decimals Steps To Reproduce Steps to reproduce the behavior:

  1. Have a NumericTextBox with a certain fraction length (let's say 2)
  2. Start with value 0. (so zero and the decimal separator)
  3. Keep typing zeros, the inputbox will show as follows: 3.1. 0.0 3.2. 0.00 3.3. 0 3.4 00 3.5 000 3.6 0000

This issue is testable on the Fraction Length example (https://www.telerik.com/kendo-angular-ui/components/inputs/numerictextbox/precision/#toc-fraction-length)

Expected behavior When going over the limit, no more input is added, it does not change the current inputted value.

In other words: When inputting x.xxx into a NumericTextBox with 2 decimals fraction length, i expect the input to be x.xx, regardless of x = 5 or x = 0, and not suddenly x

MidasLamb avatar Nov 21 '19 13:11 MidasLamb

Facing same issue I have set [decimals]="2" in my code. Which should restrict only 2 digits after decimals. It is working fine if am adding non-zero values. But if am adding 0's it is not restricting user from entering 0.

Ex : 3.540000 (it should be restricted, but am able to enter multiple 0's after 2 decimal points).

shubhamk392 avatar Dec 11 '19 06:12 shubhamk392

@shubhamk392 What you describe doesn't seem to be the same issue as what i'm describing?

MidasLamb avatar Dec 11 '19 12:12 MidasLamb

Hi @shubhamk392,

The described use case is already fixed. However, the main issue is still present (also reported in private support thread 1468509).

mbechev avatar May 26 '20 09:05 mbechev

Hi @mbechev ,

Just to clarify, you mean that the issue @shubhamk392 referenced is fixed (exceeding the limit), but that my issue (x.000 being cut of to x when trying to exceed the limit with 0) is still present?

MidasLamb avatar May 26 '20 13:05 MidasLamb

Hi @MidasLamb,

Yes, the issue that you are experiencing is still present. We will update the status of the report when the fix is available.

mbechev avatar May 28 '20 14:05 mbechev