{"id":12695,"date":"2022-10-03T15:40:42","date_gmt":"2022-10-03T19:40:42","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12695"},"modified":"2022-10-03T15:40:45","modified_gmt":"2022-10-03T19:40:45","slug":"how-to-disable-keyboard-input-in-javascript","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/how-to-disable-keyboard-input-in-javascript\/","title":{"rendered":"How to Disable Keyboard Input in JavaScript"},"content":{"rendered":"\n
Use this to disable keyboard input in JavaScript:<\/p>\n\n\n\n
$('#datepicker').keypress(function(event) {\n event.preventDefault();\n return false;\n});<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,23,25,27,15,16],"tags":[328,333,424,433,449,471,635,638],"yoast_head":"\nHow to Disable Keyboard Input in JavaScript [Snippet]<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n