Negative value can not be entered when type is changed to "number"

4 posts, 0 answers
  1. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 21 Mar 2018 Link to this post

    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

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 23 Mar 2018 Link to this post

    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.
  3. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2018 Link to this post

    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

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 27 Mar 2018 Link to this post

    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.
Back to Top