Add extra check to make sure that the to date and time cannot be earlier than the from date and time.