Rafi bin Khadij and Sahl Bi Abi Hathamah narrated that the Messenger of Allah forbade Muzabanah, which means selling fresh dates still on the tree for dried dates, except in cases of 'Araya, for which he gave permission. (Sahih (Using translation from Nasāʾī 4543)
أَنَّ رَسُولَ اللهِ ﷺ نَهَى عَنِ الْمُزَابَنَةِ الثَّمَرِ بِالتَّمْرِ إِلَّا أَصْحَابَ الْعَرَايَا فَإِنَّهُ قَدْ أَذِنَ لَهُمْ