KendoUI NumericTextBox output type is “text” instead of “number”

4 posts, 0 answers
  1. Joe
    Joe avatar
    10 posts
    Member since:
    May 2015

    Posted 23 Nov 2015 Link to this post

    I am using KendoUI components to write a mobile friendly website. I've come across my first issue with the KendoUI controls. I have an Input DOM element as below:

    <input type="number" id="myNumberInput" min="1" max="10" />

    and the javascript behind this is as follows:

    var inputDOM = $("#myNumberInput");
    inputDOM.kendoNumericTextBox({format: "#"});

    after the kendo control has been created, both the new input tag created by kendo and the old ones have both had their "type" properties set to "text" instead of "number". This has now completely removed the benefits on a phone where a context specific (i.e a number pad) is displayed when a "number" type input is selected.
    Is there any way I can change the type property back to "number", or is there anything i'm missing?.
    I can change the type of the original input object by just doing the below after the kendo control is made

    inputDOM.prop("type", "number");

    but this doesn't help the actual control now visible to the user. I've also tried the wrapper and element properties on the numericTextBox object as below

    inputDOM.data("kendoNumericTextBox").element.prop("type", "number"); inputDOM.data("kendoNumericTextBox").wrapper.prop("type", "number");

    but this did not seem to change the property of the visible control, the "element" only changed the value of the original now hidden Input element.
    Any ideas where i've gone wrong, or how I can achieve this?

  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 25 Nov 2015 Link to this post

    Hi Joe,

    Please check the following documentation section -

    http://docs.telerik.com/kendo-ui/web/numerictextbox/overview#input-type

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Joe
    Joe avatar
    10 posts
    Member since:
    May 2015

    Posted 25 Nov 2015 in reply to Dimo Link to this post

    Hi Dimos,

    I'm interested what actually stops working if the type tag is set to "number" instead of "text". Is this also you saying there is no way I can access the output HTML via the kendo methods in js to try it myself?

  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 25 Nov 2015 Link to this post

    Hello Joe,

    <input type="number" /> currently does not support values with a comma as a decimal separator.

    We will update the mentioned documentation section with more specific information shortly. You can check it once the changes are uploaded and let me know if you have additional questions.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready