fix date validation issue