The Messenger of Allah ﷺ forbade selling dates until they begin to ripen and ears of grain until they turn white and are safe from blight. He forbade this to both seller and buyer.
حدثنا عبد الله بن محمد النفيلي حدثنا ابن علية عن أيوب عن نافع
أن رسول الله ﷺ نهى عن بيع النخل حتى يزهو وعن السنبل حتى يبيض ويأمن العاهة نهى البائع والمشتري
[Isnad]: Muslim narrated it in Sahih Muslim, Book of Sales, Chapter on the prohibition of selling fruits before their ripeness becomes apparent, etc., hadith no. 1535, from the hadith of Ismail bin Ulaya through the same chain.