The Messenger of Allah ﷺ came into the mosque carrying a staff, and a man had hung up a cluster of inferior, dried-out dates as charity. He struck that cluster with his staff and said, "If the owner of this charity had wished, he could have given something better than this." Then he said, "The owner of this charity will eat these poor dates on the Day of Resurrection."
حدثنا نصر بن عاصم الأنطاكي حدثنا يحيى يعني القطان عن عبد الحميد بن جعفر حدثني صالح بن أبي عريب عن كثير بن مرة
دخل علينا رسول الله ﷺ المسجد وبيده عصا وقد علق رجل قنا حشفا فطعن بالعصا في ذلك القنو وقال لو شاء رب هذه الصدقة تصدق بأطيب منها وقال إن رب هذه الصدقة يأكل الحشف يوم القيامة
[Its isnad is hasan] Ibn Majah narrated it in Kitab al-Zakat, chapter "The prohibition against giving the worst of one's wealth in charity," hadith 1821, from the hadith of Yahya Qattan, with this chain. Ibn Khuzayma declared it sahih, hadith 2467, as did Ibn Hibban, hadith 837, and Hakim, 4/425, 426, and Dhahabi agreed with him.