Self-consistent spatially-resolved star formation histories of 2 < z < 3 galaxies from CANDELS