The Messenger of Allah ﷺ forbade muzabanah, which is selling the fruit of one's orchard, if it consists of palm trees, for dried dates by measure, or, if it is a vineyard, selling its grapes for raisins by measure, or, if it is a standing crop, selling it for a measure of grain. He forbade all of that.
أخبرنا قتيبة قال حدثنا الليث عن نافع
نهى رسول الله ﷺ عن المزابنة أن يبيع ثمر حائطه وإن كان نخلا بتمر كيلا وإن كان كرما أن يبيعه بزبيب كيلا وإن كان زرعا أن يبيعه بكيل طعام نهى عن ذلك كله
Bukhari recorded it in the Book of Sales, chapter on selling crops for food measured by volume, hadith no. 2205, and Muslim recorded it in the Book of Sales, chapter on the prohibition of selling fresh dates for dried dates except in cases of araya, hadith no. 76/1542, from Qutayba, with this wording, and it is also in Al-Kubra, hadith no. 6140.