jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput Why isn’t input tag working with numberInput?

This topic contains 5 replies, has 2 voices, and was last updated by  Peter Stoev 12 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

  • genachka
    Participant

    I want to have a spinner on an input field, and have it be inline with a label, etc. But I can’t seem to make it work on anything but a div tag. I tried with 2.8.1. Is this a bug? I don’t want to create css for div to be inline just for this.

    This works:

    Enter number:

    $('#number').jqxNumberInput({
    decimal : 0,
    decimalDigits: 0,
    digits : 2,
    min : 1,
    max : 90,
    width : '40px',
    height : '1.25em',
    spinButtons : true
    });


    Why doesn’t this work??:
    Enter number:

    $(‘#number’).jqxNumberInput({
    decimal : 0,
    decimalDigits: 0,
    digits : 2,
    min : 1,
    max : 90,
    width : ’40px’,
    height : ‘1.25em’,
    spinButtons : true
    });


    Peter Stoev
    Keymaster

    Hi,

    The jqxNumberInput should be created from DIV tag as shown in the help docs and online demos.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    genachka
    Participant

    Peter yes I saw that it works with DIV. But my question was why is DIV only supported instead of the expected Input tag? Also, aside from the sample that uses a DIV, there is no where in the API docs that explicitly states that you can ONLY use a DIV. It would be helpful where you have such limitations that you state so in the docs.

    Are is Input tag and others planned to be supported?


    Peter Stoev
    Keymaster

    Hi,

    In the help documentation topics about the widget and in all samples about it is used a DIV tag, not INPUT tag. If you want to use that widget, then please use it in the way it is demonstrated.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    genachka
    Participant

    Wow. Talk about being difficult! Are you actually reading what I wrote or just blindly responding?

    I stated #1

    … aside from the sample that uses a DIV, there is no where in the API docs that explicitly states that you can ONLY use a DIV. It would be helpful where you have such limitations that you state so in the docs.

    When I look at: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxnumberinput/jquery-number-input-getting-started.htm

    It states

    The next step is to create a DIV element within the body of the html document.

    <div id='jqxnumberinput'>
    </div>

    But it doesn’t directly mean that others aren’t supported. It would have been more helpful to write somewhere there that DIV is the only tag supported at this time.

    And 2) I asked

    … why is DIV only supported instead of the expected Input tag? Is Input tag and others planned to be supported?

    You’re not addressing my comment about lack of info that explicitly states to use DIV in the docs nor are you answering if this is a temporary limitation and will be addressed soon. Your response is very unhelpful! Telling me that DIV is used in the samples doesn’t automatically imply that ONLY DIV is supported. And I’m not arguing with you what you support, and realized that it’s DIV before I wrote the original post. So you’re missing my point and question. My point is that you need to make your documentation more clear. And my question still is left unanswered.


    Peter Stoev
    Keymaster

    Hi genachka,

    You can create a new instance of jqxNumberInput only from a DIV tag. That is the expected HTML Element and that is how the widget is designed to work. If it was designed to work with any HTML Element, we would have written that in our documentation. We will consider improving our help documentation in the future by adding a Note that a DIV tag is expected when working with jqxNumberInput. Thank you for your feedback!

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.