jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput numeric validation without showing the mask?

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 13 years, 1 month ago.

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

  • ehoffman62
    Member

    is there a way to not show the mask and yet get the validation logic like min and max. I’m playing with the grid popup editing and I don’t want the input mask for the quantity and price fields. if I change column for these fields to “text” like this:
    { text: ‘Quantity’, datafield: ‘quantity’, width: 90, cellsalign: ‘right’ },
    { text: ‘Price’, datafield: ‘price’, width: 90, cellsalign: ‘right’, cellsformat: ‘c2’ }

    then the input boxes on the popup form don’t show up, even thou the $(“#quantity”).val(dataRecord.quantity) has a value (alert(dataRecord.quantity + ” – ” + dataRecord.price); shows value).

    I was thinking that if the popup form allowed them to be text, then I could do the validation in the $(“#Save”).click(function ().

    hope this makes sense???


    ehoffman62
    Member

    just looking at http://www.jqwidgets.com/jquery-number-input/ and it has a section called:

    TextBox Input

    jqxNumberInput supports an additional input mode which much resembles the default textbox input. This input mode is without prompt characters and is restricting the user input to numeric values.

    I can’t figure out how to turn on the input mode to do this???


    ehoffman62
    Member

    Tried adding decimalDigits: 0, decimal: 0, promptChar: “” ,decimalSeparator: “” ,spinButtons: false to the following line

    $(“#quantity”).jqxNumberInput({ width: 150, height: 23, theme: theme, decimalDigits: 0, decimal: 0, promptChar: “” ,decimalSeparator: “” ,spinButtons: false });

    got ..5 (where quantity = 5)


    Peter Stoev
    Keymaster

    To have an input mode without prompt chars, use this:

       $("#numericInput").jqxNumberInput({ width: '250px', height: '25px', spinButtons: true, inputMode: 'simple', theme: theme });

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.