This is a migrated thread and some comments may be shown as answers.
Negative value can not be entered when type is changed to "number"
3 Answers 38 Views
This is a migrated thread and some comments may be shown as answers.
kako
Top achievements
Rank 1
kako asked on 22 Mar 2018, 04:39 AM

Hi.

I change the type of the input element to "number" from "text" because I want to display a numeric input keyboard with a smart device.

However, I noticed that I can not enter negative values more than 10 digits from the PC keyboard..

Can I enter a negative value?

https://dojo.telerik.com/ACAquqIL

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 23 Mar 2018, 06:48 AM
Hi Kako,

The NumericTextBox widget is using type "text" for the input element to allow internalized number formats. When you change the type to "number", the browser`s validation will interfere with the widget`s validation. If you want to use input element with "number" type I would suggest using a simple INPUT element styled with the Kendo styles. You can refer to the following public issue for more information on this matter:

Best Regards,
Konstantin Dikov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
kako
Top achievements
Rank 1
answered on 26 Mar 2018, 02:23 AM

Thank you for answering!

I tried the following, 

1. Enter "-5"

2. Subsequent to "-5", enter "4"

3. As shown in the attached image, "4-5" is assigned to "value".
(The value I expect is "-54".)

Therefore, it seems that the verification of line 39906 does not go well, but is this movement correct?

https://dojo.telerik.com/IFOkijIf

0
Konstantin Dikov
Telerik team
answered on 27 Mar 2018, 11:22 AM
Hello Како,

I see in the dojo example that the "type" attribute is still set to "number", which is not supported with the NumericTextBox. Please use plain INPUT element without initializing a NumericTextBox over it if you need to set the "number" type, which will allow you to use the browser validation for that type.


Best Regards,
Konstantin Dikov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
kako
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
kako
Top achievements
Rank 1
Share this question
or