NumericTextBox : max and min don't work wih spinners display to false

1 Answer 72 Views
NumericTextBox
Cyril
Top achievements
Rank 1
Iron
Cyril asked on 28 Jul 2021, 08:09 AM

Hello,

With NumericTextBox  : Max and  Min don't work wih spinners display to false or true

FormatOptions attribute don't work too !!!

See your website directly :

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

Do you know how resolve this issue ?

I can use MaskedTextBox or a simple Input but I would like use NumericTextBox !

Cyril REILER

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 30 Jul 2021, 07:06 AM

Hello Cyril,

After checking the provided example it appears that in case of uncontrolled value, it's never corrected (ranged) to be between min and max props on blur event. I fixed the issue on our side and it will be shipped with next dev versions to the end of the next week (link). As a sign of appreciation for reporting the bug I updated your Telerik points. Until the fix is available I would suggest to use the controlled mode of the NumericTextBox. 

Also I would like to mention that the reason why some restrictions are not applied on keyboard input and the validation is made on blur is because sometimes in order to enter a number that is valid, a person must first enter an invalid one. For example, if the min property is set to 5 and the user wants to enter the number 40, the NumericTextBox should not prevent the user from typing 4 (even though it is smaller than 5), since this way the user would not be able to enter the correct value at all. This is the default behavior of the HTML input element, and since the NumericTextBox is based on it, the behavior of the NumericTextBox is the same. You can see how the default HTML input element behaves here:

- https://www.w3schools.com/tags/att_input_min.asp 

Regards,
Vladimir Iliev
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
Cyril
Top achievements
Rank 1
Iron
Answers by
Vladimir Iliev
Telerik team
Share this question
or