No, it is not illegal. Consenting adults have the right to date whomever they choose.