Home sale taxed in both states

I moved from CA to VA last year and didn't sell my CA house until a month later.  The profit exceeded the exclusion, so I owe long-term capital gains taxes both federally and at the state level.

 

California taxes 100% of the (non-excluded) proceeds since the property was in CA (TT explicitly itemizes the various combinations of CA/non-CA property and resident/non-resident).  But when I work out the Virginia taxes, it only asks how much of the capital gain occurred while I was a VA resident, which is also 100%.  So both states are fully taxing the same income.  IIUC, this is not supposed to be allowed: how do I fix this so that the proper reciprocity kicks in?