Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

504
Visualizações
How can I allow users to enter "." in an iOS numeric keyboard with <input>?

I have read this post:

https://css-tricks.com/finger-friendly-numerical-inputs-with-inputmode/

It says I can use the following code to allow users to enter numbers with a number-only virtual keyboard, which is quite convenient than the traditional virtual keyboard:

<label for="creditcard">credit card number:</label> <input pattern="[0-9]*" type="text" name="creditcard">

enter image description here

However, there is no way to enter dot here. For instance, if I want to enter 5.6 or 6.0, I got stuck there.

Is there any way I can do this?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I hope you are doing well and safe from COVID-19.

<input type="tel" inputmode='decimal'/>

I’ve been using input type = tel it accepts pattern parameters and pulls up the number keyboard inputs on mobile. The keyboard on mobile for type=”tel” has some phone-specific characters like #, but its not a bad solution until support for inputmode is better, even if it feels semantically wrong. It doesn’t seem to affect screenreaders in a negative way. Thanks.

over 4 years ago · Santiago Trujillo Relatório

0

replace

<input type="number" inputmode='numeric"/>

by

<input type="number" inputmode='decimal'/>

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda