Improve date validation handling.