Added validation for time and date