What is the difference between numeric and number?

Updated:

Related page: Input

While looking at the available types on the q2-input component, you may notice two that seem similar enough that they may cause confusion (i.e., number and numeric). Here is the difference between the two:

  • number - Sets the input type to "number", and allows you to type a basic number with a single decimal point. There is no input-masking or special formatting that occurrs.
  • numeric - Can make use of format-modifier options to provide more complex values. Some of these include:
    • Entering multiple-decimal point values (e.g., an IP address). This is the default behavior.
    • delimited - Comma-delimited values
    • integer - Integer values (i.e., no decimal point)
    • Ndec - Decimal point customization, where N is the number of digits after the decimal point.

You may also read more about this under the Format Modifiers documentation for q2-input.