validate date and time inputs