Fixed the date bug

did exception to prevent user from choosing invalid date, and time.