From Sahih Muslim (Hadith 3864):
Ibn 'Umar (Allah be pleased with them) reported that Allah's Messenger (ﷺ) forbade the sale of palm-trees (i. e. their trults) until the dates began to ripen, and ears of corn until they were white and were safe from blight. He forbade the seller and the buyer
Reference: Muslim 3864