Ibn Umar (Allah be pleased with them) reported Allah's Apostle (ﷺ) forbidding the sale of fruits until their good condition becomes evident and the purchase of dates for dates.
Related hadith on this topic
Explanation & Benefits
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Benefits and Issues: If dates on the tree are sold in exchange for already picked dry dates, this is called "Bay‘ Muzabana," and except for the case of ‘Araya, it is unanimously impermissible. However, if fresh dates are picked and then sold in exchange for dry dates, then according to the three Imams and the two companions (Abu Yusuf and Muhammad), it is impermissible. According to Imam Abu Hanifah, if it is hand-to-hand (immediate exchange) and equal in quantity, then it is permissible; if there is any excess or deficiency, or if it is on credit, then it is impermissible.
‘Allamah Sa‘id has acknowledged that Imam Abu Hanifah’s position is contrary to the authentic hadith and has adopted the view of the two companions.
(Sharh Sahih Muslim: Vol. 4, p. 204)
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 3875