The Messenger of Allah ﷺ forbade the sale of fresh dates on the tree in exchange for dried dates, and he said, "That is usury, that is muzabanah." However, he granted a concession for the sale of the ariyyah, where a household may take a palm tree or two by estimating its yield in dried dates so they may eat the fruit fresh.
أن رسول الله ﷺ نهي عن بيع الثمر بالتمر، وقال: ذلك الربا، تلك المزابنة. إلا أنه رخص في بيع العرية، النخلة والنخلتين يأخذها أهل البيت بخرصها تمرا، يأكلونها رطبا.
Bukhari reported it in the Book of Sales (2191), and Muslim in the Book of Sales (1540:67), both through the route of Yahya bin Saeed (that is, Ansari), from Bashir bin Yasar, from some of the companions of the Messenger of Allah ﷺ from the people of their household, among them Sahl bin Abu Hathmah, who mentioned it. The wording is that of Muslim.