This might help:
$('.today').keyup(function(e) {
if(~[38, 39, 40, ...].indexOf(e.keyCode || e.which)) {
e.preventDefault();
return;
}
...
}
The key there being the call to e.preventDefault()
.
You also have of the element the keyup event originated in as e.target
.
HTH