How to accept decimal number in f7-list-input

Hi,

I have some problem to enable decimal number input in a <f7-list-input> field.

image

Starting from the documentation, can someone help me to write the right attribute to accept decimal number?

  <f7-list-input
    label="Number"
    type="text"
    placeholder="Enter number"
    info="With custom error message"
    error-message="Only numbers please!"
    required
    validate
    pattern="[0-9]*"
    clear-button
  >

Thank you

Первая ссылка в Google: https://stackoverflow.com/questions/19011861/is-there-a-float-input-type-in-html5

1 Like

Remove pattern and change input type to number

<f7-list-input
    label="Number"
    type="number"
    placeholder="Enter number"
    info="With custom error message"
    error-message="Only numbers please!"
    required
    validate
    clear-button
  >
1 Like

Thank you.

I still have an error when I try to input the first decimal number in the input field.

I’ve solved the problem by adding step="0.01" attribute to the <f7-list-input>

Example

<f7-list-input
    label="Number"
    type="number"
    placeholder="Enter number"
    info="With custom error message"
    error-message="Only numbers please!"
    step="0.01"
    required
    validate
    clear-button
  >