state tax when work in two states

Hi,

    I worked in CA for 8 months, and then jumped to another company in WA for another 4 months. and CA has state tax while WA does not.

 

    Do I need to pay CA state tax for the whole year or just the 8 months in CA? Is turbotax smart enough to do it automatically based on W2 or I need to tell it when do i start to work in WA?