etino
1
Hi,
I have some problem to enable decimal number input in a <f7-list-input>
field.
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
shastox
2
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
etino
5
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
>