State tax filing

Thanks for your help @TomD8 . Example 1 on Page 6 is the same as my case. I am wondering, in this case, should I consider that all of the income is CA taxable or do I need to do some calculation?  Let's say I have 40K income last year and I stayed in CA half of year for work. In this case, should I consider 40K as my CA income or 20K as my CA income?