When did Illinois' capital move to Vandalia?

Vandalia became the capital of Illinois in 1820. It continued as the capital until 1839.