Lived in CA then moved to AZ. Work remote for the CA company. Do I only pay CA taxes for time I lived there?

I lived in CA at the start of the year, half way through the year I moved to AZ. I was approved to work remotely for the same company that is based out of CA. My pay stubs have been going towards CA taxes, because I now live in my home in AZ would I all of my taxable income go towards CA or only for the months that I lived there and the rest to AZ?