Yeah, that was about the same time they were legal here, but it remained legal in the US through the beginning of the 20th century.
And in the early 20th century opium dens started appearing in the US and there was a public outcry.