Locale

Change the locale of the datepicker, schedule and client side validation messages.

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

Input Style

Themes

PrimeUIX
Aura Light Emerald Aura Light Emerald
Aura Dark Emerald Aura Dark Emerald
PrimeOne
Saga Blue Saga Blue
Vela Blue Vela Blue
Arya Blue Arya Blue
Bootstrap
Bootstrap Blue Light Bootstrap Blue Light
Bootstrap Purple Light Bootstrap Purple Light
Bootstrap Blue Dark Bootstrap Blue Dark
Bootstrap Purple Dark Bootstrap Purple Dark
Material Design
Material Indigo Light Material Indigo Light
Material Deep Purple Light Material Deep Purple Light
Material Indigo Dark Material Indigo Dark
Material Deep Purple Dark Material Deep Purple Dark
Material Design Compact
Material Compact Indigo Light Material Compact Indigo Light
Material Compact Deep Purple Light Material Compact Deep Purple Light
Material Compact Indigo Dark Material Compact Indigo Dark
Material Compact Deep Purple Dark Material Compact Deep Purple Dark
Legacy
Nova Light Nova Light
Nova Dark Nova Dark
Nova Colored Nova Colored
Luna Amber Luna Amber
Luna Blue Luna Blue
Luna Green Luna Green
Luna Pink Luna Pink

InputNumber

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

InputNumber Tag Documentation

InputNumber is an extension to the InputText with optimized handling for numbers.

NameTypeRequiredDefaultDescription
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
valueChangeListener ValueChangeListener false A method binding expression referring to a method for handling a valuchangeevent.
value Object false Value of the component.
validatorMessage String false Custom message to display when validation fails.
validator Validator false A method expression referring to a method validating the input.
valid boolean false true Indicates whether the input's value is valid.
type String false text Input field type.
title String false Specifies extra information about an element (displayed as a tooltip).
thousandSeparator String false Thousand separator character. Defaults to locale-specific separator if not specified.
tabindex String false Specifies the tab order of an element.
symbolPosition String false Position of the symbol. Options: 'p' for prefix, 's' for suffix.
symbol String false Currency symbol to display.
submittedValue Object false
styleClass String false Specifies one or more CSS class names for an element.
style String false Specifies an inline CSS style for an element.
size int false Integer.MIN_VALUE Number of characters used to determine the width of the input element.
signPosition String false Position of the sign. Options: 'p' for prefix, 's' for suffix.
selectOnFocus boolean false true When enabled, selects all text on focus.
roundMethod String false S Rounding method. Options: 'S' for standard, 'A' for away from zero, 'C' for ceiling, 'F' for floor, 'D' for down, 'U' for up.
role String false Defines the role of the element for accessibility purposes.
requiredMessage String false Custom message to display when the required validation fails.
required boolean false false Marks component as required.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
readonly boolean false false Specifies that an input field is read-only.
placeholder String false Specifies a short hint describing the expected value of the input.
padControl String false true Padding control. Options: 'true', 'false', 'floats'.
onwheel String false Script to execute when the mouse wheel is used.
onselect String false Script to execute when text is selected.
onsearch String false Script to execute when a search is performed.
onscroll String false Script to execute when the element is scrolled.
onreset String false Script to execute when the form is reset.
onpaste String false Script to execute when content is pasted into the element.
onmouseup String false Fires when a mouse button is released over an element.
onmouseover String false Fires when the mouse pointer moves onto an element.
onmouseout String false Fires when the mouse pointer moves out of an element.
onmousemove String false Fires when the mouse pointer is moving while it is over an element.
onmousedown String false Fires when a mouse button is pressed down on an element.
onkeyup String false Fires when a user releases a key.
onkeypress String false Fires when a user presses a key.
onkeydown String false Fires when a user is pressing a key.
oninvalid String false Script to execute when the element's value is invalid.
oninput String false Script to execute when the element receives user input.
onfocus String false Fires when an element gets focus.
ondrop String false Script to execute when a dragged element is dropped.
ondragstart String false Script to execute at the start of a drag operation.
ondragover String false Script to execute when a dragged element is over a valid drop target.
ondragleave String false Script to execute when a dragged element leaves a valid drop target.
ondragenter String false Script to execute when a dragged element enters a valid drop target.
ondragend String false Script to execute at the end of a drag operation.
ondrag String false Script to execute when an element is dragged.
ondblclick String false Fires when a mouse double-click on the element.
oncut String false Script to execute when content is cut from the element.
oncopy String false Script to execute when content is copied from the element.
oncontextmenu String false Script to execute when the context menu is triggered.
onclick String false Fires when a mouse click on the element.
onchange String false Fires when the value of an element has been changed.
onblur String false Fires when an element loses focus.
modifyValueOnWheel boolean false true When enabled, mouse wheel modifies the value.
modifyValueOnUpDownArrow boolean false true When enabled, up/down arrow keys modify the value.
minValue String false Minimum value allowed.
maxValue String false Maximum value allowed.
maxlength int false Integer.MIN_VALUE Defines the maximum number of characters allowed in the input.
localValueSet boolean false false Indicates whether the local value of the component has been set.
leadingZero String false allow Leading zero behavior. Options: 'allow', 'deny', 'keep'.
lang String false Specifies the language of the element's content.
label String false A localized user presentable name.
inputStyleClass String false CSS class for the input element.
inputStyle String false Inline style for the input element.
inputmode String false Specifies the type of data expected in the input, aiding virtual keyboards.
immediate boolean false false When set true, process validations logic is executed at apply request values phase for this component.
id String false generated Unique identifier of the component in a namingContainer.
emptyValue String false focus Empty value behavior. Options: 'focus', 'blur', 'always', 'never'.
disabled boolean false false Specifies that an element should be disabled.
dir String false ltr Direction indication for text that does not inherit directionality.
decimalSeparatorAlternative String false Alternative decimal separator character.
decimalSeparator String false Decimal separator character. Defaults to locale-specific separator if not specified.
decimalPlacesRawValue Integer false Raw value for decimal places.
decimalPlaces String false Number of decimal places to display.
converterMessage String false Custom message to display when conversion fails.
converter Converter false EL expression resolves to a converter instance or literal converter ID defining a component converter.
caretPositionOnFocus String false Caret position on focus. Options: 'start', 'end', 'min', 'max'.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
autocomplete String false Controls browser autocomplete behavior. Possible values are 'on', 'off', and 'new-password'.
ariaLabelledBy String false
ariaDescribedBy String false Identifies the element(s) that describe the object, enhancing accessibility.
alt String false Alternate textual description of the input field.
accesskey String false Access key to transfer focus to the input element.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc

Usage


<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>