Error handling for date inputs.