The high-energy radiation emitted by young stars can have a strong influence on their rotational evolution at later stages. This is because internal photoevaporation is one of the major drivers of the dispersal of circumstellar disks, which surround all newly born low-mass stars during the first few million years of their evolution. Employing an internal EUV/X-ray photoevaporation model, we have derived a simple recipe for calculating realistic inner disk lifetimes of protoplanetary disks. This prescription was implemented into a magnetic-morphology-driven rotational evolution model and is used to investigate the impact of disk locking on the spin evolution of low-mass stars. We find that the length of the disk locking phase has a profound impact on the subsequent rotational evolution of a young star, and the implementation of realistic disk lifetimes leads to an improved agreement of model outcomes with observed rotation period distributions for open clusters of various ages. However, for both young star-forming regions tested in our model, the strong bimodality in rotation periods that is observed in h Per could not be recovered. h Per is only successfully recovered if the model is started from a double-peaked distribution with an initial disk fraction of 65%. However, at an age of only ∼1 Myr, such a low disk fraction can only be achieved if an additional disk dispersal process, such as external photoevaporation, is invoked. These results therefore highlight the importance of including realistic disk dispersal mechanisms in rotational evolution models of young stars.