jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput Number format

This topic contains 3 replies, has 2 voices, and was last updated by  support 12 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Number format #14807

    morfeusz
    Participant

    How to format simple number like this (without decimals):
    1 000 000

    without generate masking.

    Number format #14814

    support
    Participant

    Hi morfeusz,

    To change the group separator you can do the following:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxnumberinput.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getDemoTheme();
    // Create jqxNumberInput
    $("#numericInput").jqxNumberInput({ width: '250px', height: '25px', theme: theme, groupSeparator: " ",decimalDigits:0 });
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div style='margin-top: 10px;'>
    Number</div>
    <div style='margin-top: 3px;' id='numericInput'>
    </div>
    </div>
    </body>
    </html>

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Number format #14828

    morfeusz
    Participant

    Thanks for help,

    and for hidding maskig we can set
    promptChar: ” “

    Number format #14842

    support
    Participant

    Hi morfeusz,

    To replace the mask characters you can set the promptChar property with the following possible values :”_”; “?”; “#”;” ” or some other character without an empty string.

    Best Wishes,
    Mariya

    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.