I have a calendar datepicker in CodeIgniter. This field is required to successfull process the script, and I want to block keyboard input on this input - by security reason and hide keyboard on data-entry on smartphones.
Now I'm using required field and I added class readonly to it:
<script>
$(".readonly").keydown(function(e){
e.preventDefault();
});
</script>
It works on PC, but not in mobile - like android.