The Prophet (ﷺ) forbade the s of (date) fruits till they were red or yellow and fit for eating.
Sahih al-Bukhari Book 34, Hadith 143