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.
حدثنا إسماعيل أخبرنا أيوب عن نافع
أن رسول الله ﷺ نهى عن بيع النخل حتى يزهو وعن السنبل حتى يبيض ويأمن العاهة نهى البائع والمشتري
Its isnad is sahih. Malik related it in Muwatta 2:124 in abbreviated form from Nafi. All the compilers except Tirmidhi related it with the wording of the Muwatta, and all except Bukhari and Ibn Majah related it with the exact wording found here, as in Al-Muntaqa 2851, 2852. See also what has already appeared in Musnad Ibn Abbas, 3173, 3361.Yazhu means its fruit becomes visible, or it turns red and yellow. The wisdom behind this prohibition is to protect people from being deceived in transactions, and to safeguard their food supply so that it does not become an object of speculation for speculators, causing food to become scarce when people need it, just as you see now in our countries, indeed throughout the whole world, since they have followed Satan and fabricated laws that contradict all the divine legislations.