The Messenger of Allah ﷺ forbade muzabanah. Muzabanah is when a man sells the dates of his orchard, if it is palm trees, for dates measured by volume, or if it is a vineyard, that he sells it for raisins measured by volume, or if it is a crop, that he sells it for a measure of grain. He forbade all of that.
حدثنا محمد بن رمح أنبأنا الليث بن سعد عن نافع
نهى رسول الله ﷺ عن المزابنة والمزابنة أن يبيع الرجل تمر حائطه إن كانت نخلا بتمر كيلا وإن كانت كرما أن يبيعه بزبيب كيلا وإن كانت زرعا أن يبيعه بكيل طعام نهى عن ذلك كله
Bukhari narrated it in the Book of Sales, Chapter: Selling standing crops for grain measured out, hadith no. 2205, and Muslim in the Book of Sales, Chapter: The prohibition of selling fresh dates for dried dates except in the case of araya, hadith no. 76/1542, from the hadith of Layth, with this same chain.