Fixes date validation.