Kendo Numeric Text Box Out of Range Changing to Min or Max

1 Answer 34 Views
NumericTextBox
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Lee asked on 21 Jan 2022, 06:15 PM | edited on 21 Jan 2022, 06:16 PM

I am trying to use the kendo numeric text box (jquery), however I'm having an issue. I'm using the text box to collect the user's year of birth. This can realistically be a value between 1902 and 2022 (the current year). I set the min to 1902 and the max to 2022. The user can also choose to leave this field blank and not provide a year of birth. When a user types 19 into the field it changes it to 1902. I don't want this as the likelihood that the user's year of birth is actually 1902 is very small. Instead I would like it to blank the field out. I have tried getting rid of the min and max values but then the up/down arrows become virtually useless since the user would have to click up 1,902 times just to get to a valid value.  How can I keep the up arrows starting at 1902 and ending at 2022 while also not having kendo change the value to the min or max?

I have seen a few other posts on the topic that are old and the issue was never properly addressed. 

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 26 Jan 2022, 09:57 AM

Hello, Lee,

As this is a built-in behavior of the widget, the only way to properly change it is to modify the internal logic that handles the adjusts the values.

I've prepared a Dojo example and left comments describing the overall idea behind the logic:

https://dojo.telerik.com/@gdenchev/inOQecuQ 

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
NumericTextBox
Asked by
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Georgi Denchev
Telerik team
Share this question
or