When the Messenger of Allah ﷺ arrived in Medina, the people had two days on which they would play and celebrate. He asked, "What are these two days?"They replied, "We used to celebrate on these days during the time of ignorance."The Messenger of Allah ﷺ said, "Allah has replaced them for you with something better, the day of Adha and the day of Fitr."
قدم رسول الله ﷺ لمدينة، ولهم يومان يلعبون فيهما، فقال: ما هذان اليومان؟ قالوا: كنا نلعب فيهما في الجاهلية، فقال رسول الله ﷺ: إن الله قد أبدلكم بهما خيرا منهما، يوم الأضحى ويوم الفطر.
Abu Dawud (1134) and Nasai (1556) both narrated it from the hadith of Humayd, from Anas, as mentioned, and their wording is identical. Al-Hakim (1/294) also narrated it and graded it sahih according to the criteria of Muslim, and the hadith is found in Musnad Imam Ahmad (12006), both narrations coming through this same route. Nawawi said in al-Khulasah (2883), "Abu Dawud, Nasai, and others narrated it with sahih chains of transmission."A useful note. There is nothing wrong with people offering each other greetings on the occasion of Eid, such as saying, "May Allah accept from us and from you our righteous deeds," because the Companions of the Prophet ﷺ used to do this while showing joy and delight.