The evolution from outcrossing to selfing is a transition that occurred recurrently throughout the eukaryote tree of life, in plants, animals, fungi and algae. Despite some short-term advantages, selfing is supposed to be an evolutionary dead-end reproductive strategy on the long-term and its tippy distribution on phylogenies suggests that most selfing species are of recent origin. However, dating such transitions is challenging while it is central for this hypothesis. We build on previous theories to explicit the differential effect of past changes in selfing rate or in population size on the probability of recombination events along the genome. This allows us to develop two methods making use of full genome polymorphism data to 1) test if a transition from outcrossing to selfing occurred, and 2) infer its age. The sequentially Markov coalescent based (teSMC) and the Approximate Bayesian Computation (tsABC) methods use a common framework based on a transition matrix summarizing the distribution of times to the most recent common ancestor along the genome, allowing to estimate changes in the ratio of population recombination and mutation rates in time. We first demonstrate that our methods can disentangle between past change in selfing rate from past changes in demographic history. Second, we assess the accuracy of our methods and show that transitions to selfing as old as approximatively 2.5Ne generations can be identified from polymorphism data. Third, our estimates are robust to the presence of linked negative selection on coding sequences. Finally, as a proof of principle, we apply both methods to three populations from Arabidopsis thaliana, recovering a transition to selfing which occurred approximately 600,000 years ago. Our methods pave the way to study recent transitions to predominant self-fertilization in selfing organisms and to better account for variation in mating systems in demographic inferences.