Force iOS numeric keyboard with custom / currency pattern
For now, JavaScript is the only solution. Here’s the simplest way to do it (using jQuery): HTML <input type=”text”> JavaScript $(‘input[type=”text”]’).on(‘touchstart’, function() { $(this).attr(‘type’, ‘number’); }); $(‘input[type=”text”]’).on(‘keydown blur’, function() { $(this).attr(‘type’, ‘text’); }); The idea is simple. The input starts off and ends up with type=”text”, but it briefly becomes type=”number” on the touchstart event. … Read more