Added control for valid date