Fixing date validation defect