jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput 'simple' spinMode plus documentation error

Tagged: 

This topic contains 8 replies, has 3 voices, and was last updated by  fabriceb 5 years, 10 months ago.

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

  • rfladebo2
    Member

    Hello,

    Using jqxNumberInput, I do not want the value to increase at the caret position. I expect to get the behavior I want (that is, no increase in value using up arrow or mouse wheel) by specifying spinMode: ‘simple’ when I initialize jqxNumberInput like this: … jqxNumberInput({ width: ‘100px’, height: ’20px’, theme: ‘mytheme’, inputMode: ‘simple’, spinMode: ‘simple’, digits: 5, decimalDigits: 2, decimalSeparator: “.” });

    However, the value does increase at the caret position even when I specify spinMode: ‘simple’. When I specify spinMode: ‘advanced’ (the default, according to the documentation), the behavior does not change. It seems like my attempt to override the default ‘advanced’ behavior by specifying ‘basic’ does not work for spinMode. Can you tell me what I am not doing correctly?

    I noticed the following errors in the documentation for jqxNumberInput:
    1) the readOnly property is listed twice. The first listing for readOnly refers to the textAlign property which I think is an error. The second listing for readOnly does refer to readOnly as seems appropriate.
    2) the inputMode property is not included in the list of Properties. I only found out about it by reading an entry here in the forum.


    Peter Stoev
    Keymaster

    Hi rfladebo2,

    – spinMode ‘simple’ means that the value will be increased/decreased always by a step(default is 1). This is how this behavior should work by design.
    – spinMode ‘advanced’ means that the value will be increased depending on the caret’s position. This is the default behavior.
    – Changing the value with the up/down arrows keys or mouse wheel cannot be disabled. There’s no option for this in the current release.
    – I confirm the documentation issues. We’ll update the jqxNumberInput’s docs in the next release.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    rfladebo2
    Member

    Thank you for answering my question.

    Will there be an option for jqxNumberInput to disable changing the value with the up/down arrow keys or mouse wheel (or touch pad) in a coming release? The users I am working with do not like this feature at all, since it makes it very easy to change a value inadvertently, particularly with a touch pad.


    Peter Stoev
    Keymaster

    Hi rfladebo2,

    I’ll create a new work item regarding that missing feature and we’ll implement it in a future version.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    rfladebo2
    Member

    Any idea which future version this feature/option will be scheduled for? Thanks in advance for your reply.


    Peter Stoev
    Keymaster

    The feature will be included in the next release which will be available in the second half of this month.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    rfladebo2
    Member

    Hello,

    I didn’t see a “disable spin mode” option in the list of changes and enhancements in the latest release, as discussed in this thread. Could you let me know how to disable advancement of numbers using the arrow keys, mouse wheel and touch pads?


    Peter Stoev
    Keymaster

    Hi rfladebo2,

    Set the ‘spinMode’ property to ‘none’.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    fabriceb
    Participant

    Hi rfladebo2 and Peter,

    This is quite late, but there is a new property in JqxNumberInput, which does not appear in documentation :
    enableMouseWheel ==> true by default.

    try this :
    $(“#jqxNumberInput”).jqxNumberInput({
    enableMouseWheel: false
    });

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

You must be logged in to reply to this topic.