JSFiddle - React, Tailwind, and code Playground by Yusril Maulidan Raji February 06, 2017 HTML <script src="https://getfirebug.com/firebug-lite-debug.js"></script> <input id='date' type='text' inputmode="number"> <button>What did I type?</button> JavaScript $('[inputmode]').each(function () { $(this).attr({type: $(this).attr('inputmode'), novalidate: true}) }); $('#date').on('blur', function () { $(this).attr({type:'text'}); alert("blur "+$(this).val()); }); $('button').click(function alertInput () { alert("button "+$('input').val()); })