cara menonaktifkan input keyboard di javascript

$(function() {
   $('#datepicker').keypress(function(event) {
       event.preventDefault();
       return false;
   });
});
// Example: http://jsfiddle.net/4nc46jq9/1/
Undefined