Capital gains on stock sold while living in Illinois then moved to SC
In January of 2021 we sold stock at a significant gain to by a new house in South Carolina. We moved and will be full time residents of SC as of April of 2021. I assume all the gain is taxed by Illinois. How do I exclude this income from my SC taxes?