The Messenger of Allah ﷺ forbade selling palm-trees till the dates began to ripen, and ears of corn till they were white and were safe from blight, forbidding it both to the buyer and to the seller. (Using translation from Abū Dāʾūd 3368)
أَنَّ رَسُولَ اللهِ ﷺ نَهَى عَنْ بَيْعِ النَّخْلِ حَتَّى يَزْهُوَ وَعَنِ السُّنْبُلِ حَتَّى يَبْيَضَّ وَيَأْمَنَ مِنَ الْعَاهَةِ نَهَى الْبَائِعَ وَالْمُشْتَرِيَ