The Prophet ﷺ forbade the sale of fruit before it ripens, but he granted a concession for araya, allowing them to be sold based on an estimate of their yield so that the owners could eat the dates fresh.
أخبرنا عبد الله بن محمد بن عبد الرحمن قال حدثنا سفيان عن يحيى عن بشير بن يسار
أن النبي ﷺ نهى عن بيع الثمر حتى يبدو صلاحه ورخص في العرايا أن تباع بخرصها يأكلها أهلها رطبا
Bukhari narrated it in the Book of Sales, Chapter on Selling Fruit Still on the Palm Trees for Gold or Silver, hadith 2191, and Muslim in the Book of Sales, Chapter on the Prohibition of Selling Fresh Dates for Dried Dates Except in Cases of Araya, hadith 1540, from the hadith of Sufyan bin Uyayna through this same chain. It is also in Al-Kubra, hadith 6133.Yahya is Ibn Saeed Ansari.