Locale

Language
English
English
English
French
German
German
Italian
Korean
Spanish
Catalan
Dutch
Portuguese
Portuguese
Arabic
Arabic
Bulgarian
Czech
Greek
Persian
Finnish
Danish
Hindi
Indonesian
Croatian
Japanese
Hungarian
Hebrew
Georgian
Central Kurdish
Khmer
Kyrgyz
Kazakh
Lithuanian
Latvian
Malay
Norwegian
Polish
Romanian
Russian
Slovak
Slovenian
Serbian
Swedish
Thai
Turkish
Ukrainian
Vietnamese
Chinese
Chinese

Input Style

Free Themes

Built-in component themes created by the PrimeFaces Theme Designer.

Saga Saga
Vela Vela
Arya Arya

Legacy Free Themes

Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink
Nova Nova
Nova Nova Alt
Nova Nova Accent

InputNumber

InputNumber formats input fields with numeric Strings. It supports currency symbols, minimum and maximum value, negative numbers, and a lot of round methods.


<div class="card">
    <h:form>
        <div class="ui-fluid formgrid grid">
            <div class="field col-12 md:col-4">
                <p:outputLabel for="input1" value="No Configuration"/>
                <p:inputNumber id="input1" value="#{inputNumberView.input1}" modifyValueOnWheel="false" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input2" value="Currency"/>
                <p:inputNumber id="input2" value="#{inputNumberView.input2}" symbol=" CHF"
                                symbolPosition="s" decimalSeparator="," thousandSeparator="." />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input3" value="Min-Max"/>
                <p:inputNumber id="input3" value="#{inputNumberView.input3}" minValue="-1000.999"
                                maxValue="1000" decimalPlaces="3" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input4" value="Custom Decimals"/>
                <p:inputNumber id="input4" value="#{inputNumberView.input4}" decimalPlaces="6" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input5" value="Empty Display - Blank"/>
                <p:inputNumber id="input5" value="#{inputNumberView.input5}" symbol="%"
                                symbolPosition="s" required="true" emptyValue="empty" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input6" value="Empty Display - Zero"/>
                <p:inputNumber id="input6" value="#{inputNumberView.input6}" symbol="%"
                                symbolPosition="s" emptyValue="zero" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input7" value="Empty Display - Symbol"/>
                <p:inputNumber id="input7" value="#{inputNumberView.input7}" symbol="%"
                                symbolPosition="s" emptyValue="always" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input8" value="Big Decimal"/>
                <p:inputNumber id="input8" value="#{inputNumberView.input8}" decimalPlaces="15" />
            </div>

            <div class="field col-12 md:col-4">
                <p:outputLabel for="input9" value="Positive"/>
                <p:inputNumber id="input9" value="#{inputNumberView.input9}" minValue="1" decimalPlaces="0" />
            </div>
        </div>
    </h:form>
</div>