Young low-mass stars of equal-mass exhibit a distribution of rotation periods. At the very early phases of stellar evolution, this distribution is set by the star-disc locking mechanism. The primordial disc lifetime and, consequently, the duration of the disc-locking mechanism, can be significantly shortened by the presence of a close companion, making the rotation period distribution of close binaries different from that of either single stars or wide binaries. We use new data to investigate and better constrain the range of ages, the components separation and the mass ratio dependence at which the rotation period distribution has been significantly affected by the disc dispersal that is enhanced by close companions. We select a sample of close binaries in the Upper Scorpius association (age $sim$8 Myr) whose components have measured the separation and the rotation periods and compare their period distribution with that of coeval stars that are single stars. We find that components of close binaries have on average rotation periods shorter than single stars. More precisely, binaries with about equal-mass components (0.9 $le$ M2/M1 $le$ 1.0) have rotation periods on average by $sim$0.4 d shorter than single stars; binaries with smaller mass ratios (0.8 $<$ M2/M1 $<$ 0.9) have rotation periods on average by $sim$1.9 d the primary components, and by $sim$1.0 d the secondary components shorter than single stars. A comparison with the older 25-Myr $beta$ Pictoris association shows that, whereas in the latter all close binaries with projected separation $rho$ $le$ 80 AU all rotate faster than single stars, in the Upper Scorpius that has happened for about 70% stars, yet. We interpret the enhanced rotation in close binaries with respect to single stars as the consequence of an early disc dispersal induced by the presence of close companions.