Input number cannot show character "/"

i have create an input type=“number”. I put a fraction to it, example “1/2” in database. When i get data form database and set value to the number input, it cann’t work. Why?

I don’t think you can display a fraction in an input number. If you look at the documentation, it only accept Floating-point numbers :

A floating-point number consists of the following parts, in exactly the following order:
Optionally, the first character may be a “-” character.
One or more characters in the range “0—9”.
Optionally, the following parts, in exactly the following order:

  • a “.” character
  • one or more characters in the range “0—9”
    Optionally, the following parts, in exactly the following order:
  • a “e” character or “E” character
  • optionally, a “-” character or “+” character
  • One or more characters in the range “0—9”.

You will have to use an input text I guess.

EDIT: I just saw that Ionic seems to allow special characters, so I don’t know actually…

1 Like

yes. thanks for your reply @maximel