How can I disable keyboard shortcuts for jQuery UI date selector?
I'm having a problem with the jQuery UI date selector, where when manually changing the date and hitting the enter key, the date selector date overrides the ma开发者_运维知识库nual entry (the action I'm going for is a form submit).
I'd like to disable the keyboard shortcuts on the date selector, but haven't been able to find a way.
As an option, you can try to override that behaviour by assigning another keydown event handler to your input after datepicker initialization, and check for enter key there
$('#your_input_id').keydown(function(e){
if(e.which == 13) {
$('#your_form_id').submit();
return false;
}
});
精彩评论