The code below shows how to override the 'inputEvents' and bind the 'keypress' event on the datebox component.
$('#d1').datebox({
inputEvents: $.extend({},$.fn.datebox.defaults.inputEvents,{
keypress: function(e){
var c = String.fromCharCode(e.which);
if ('0123456789/'.indexOf(c) >= 0){
return true;
} else {
return false;
}
}
})
})