Another counter-example due to Sathaye: Let $R=k[x,y]$, $f=1-x^2$, and $g=y$, then $I=(f,g)$ has height 2, so is a complete intersection. It is obviously non-singular since $(f,g)+J = (1-x^2,y,-2x) = (1,y,x) = R$. However it is obviously not connected (being the disjoint union of two points).$\newcommand{\Spec}{\operatorname{Spec}}\newcommand{\Proj}{\operatorname{Proj}}$
In particular, $J=(1-x,y)$ and $L=(1+x,y)$ have intersection $I=J\cap L = (1-x^2,y)$ and $J+L=R$, but $J \neq I \neq L$. Hence $\Spec(R/I)$ is disconnected, non-singular, and a complete (ideal theoretic and set theoretic) intersection.
We can homogenize this example to $f=z^2-x^2$, $g=y$, then for $I=(z^2-x^2,y)$, we have $\Proj(R/I)$ is a nonsingular, disconnected, complete intersection of dimension 0. This shows that the dimension requirements in the Hartshorne exercise are necessary.
If we increase the dimension by considering the example in the projective space associated to $R=k[x,y,z,w]$ and set $f=w^2-x^2$, $g=y$, then the affine patch $w=1$ is two parallel lines ($z$ free), and so is still a disconnected, non-singular, complete intersection. However, the two parallel lines meet at infinity, $[x=0:y=0:z:w=0]$ (where $z$ is free, but WLOG is $z=1$), and so the result is a connected, non-singular, complete intersection of dimension 1.
In particular, an affine patch of a non-singular connected projective algebraic set need not itself be connected.