Was Vandalia ever the state capital of Illinois?

I am not sure of the dates, but Vandalia was the capital of Illinois before it was moved to Springfield. The original capital building still stands on the city square.