Only numbers and 'd' can be entered into the input