State tax filing

On my W2, I have CA and NY state wages (boxes 15, 16, and 17 have values for CA and NY). I found this article that I think claims that CA will tax for the time I lived in CA between stock grant and vest date (see the RSU section of https://www.ftb.ca.gov/forms/misc/1004.html). Does this mean I'm essentially getting taxed twice (once on the vested shared in NY and then another for a portion of the vested shares for my time in CA)? Do I need to file state taxes for both NY and CA?