Niche complementarity is a commonly invoked mechanism underlying the positive relationship between biodiversity and ecosystem functioning, but little empirical evidence exists for complementarity among pollinator species. This study related differences in three functional traits of pollinating bees (flower height preference, daily time of flower visitation and within-flower behaviour) to the seed set of the obligate cross-pollinated pumpkin Cucurbita moschata Duch. ex Poir. across a land-use intensity gradient from tropical rainforest and agroforests to grassland in Indonesia. Bee richness and abundance changed with habitat variables and we used this natural variation to test whether complementary resource use by the diverse pollinator community enhanced final yield. We found that pollinator diversity, but not abundance, was positively related to seed set of pumpkins. Bees showed species-specific spatial and temporal variation in flower visitation traits and within-flower behaviour, allowing for classification into functional guilds. Diversity of functional groups explained even more of the variance in seed set (r2=45%) than did species richness (r2=32%) highlighting the role of functional complementarity. Even though we do not provide experimental, but rather correlative evidence, we can link spatial and temporal complementarity in highly diverse pollinator communities to pollination success in the field, leading to enhanced crop yield without any managed honeybees.