Facilitate quantity change in input number

Asked

Viewed 37 times

2

By placing a <input> with type="number" in an HTML form, viewing the page by a PC the field shows the arrows up and down, but in Mobile appears the keyboard to type the number, I wonder how I can facilitate the change of numbers to the mobile by placing buttons and even to the PC since the arrows are small and very close to each other.

Input type number

<input min="1" max="10" type="number">

There are ways to do this with CSS or just with Javascript?

  • There are only ways to do it with CSS, but for me it’s kind of a gambiarra and would only work with Webkit browsers. My tip is to use JS even, there are several examples out there

  • I get it, put one on then Hugo.

  • Actually your question is duplicated. But there in the other question I will post an answer only with CSS later. If you think she won’t listen to you tell me that I’m canceling the duplicate beauty vote. []s

  • Put it there that’s already good. (Y).

  • Relax, look at the example http://prntscr.com/n0oc2j. only now I’m leaking from the company and I can only post there more the night, but comment here when I’m in the way there

  • All right, all right!

  • Laércio, sorry for the delay, but as promised, you are there! https://answall.com/a/370139/97477

  • 1

    Thank you, I voted there!

  • It was pretty cool! Then I will update with an option to Firefox

  • I’m in need too!

  • I’ve already updated there!

Show 6 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.