Nonresident and part-year resident in one state?

I moved from Missouri to Kansas on August. I didn't have any income when i reside in Missouri. However, i worked for a  company which located in Missouri after i moved to Kansas. I'm wondering if i have to prepare both part-year resident (Jan - Aug) and nonresident (Aug - Dec) for Missouri, and part-year resident for Kansas from Aug to Dec? How to do it by turbotax?