This is the opinion of most scholars, including Ali, Ibn Abbas, al-Shafi'i, and others; we know of no disagreement regarding this. Anas said: The Prophet, peace and blessings of Allah be upon him, would not go out on the day of al-Fitr until he had eaten some dates. Narrated by al-Bukhari (1). In a narration he cited as evidence: "And he would eat them in an odd number" (2). It is also narrated from Buraydah, who said: The Prophet, peace and blessings of Allah be upon him, would not go out on the day of al-Fitr until he had broken his fast, and he would not eat on the day of al-Adha until he had prayed. Narrated by al-Athram and al-Tirmidhi (3), and the wording in al-Athram's narration is: "until he had offered the sacrifice." This is because the day of al-Fitr is a day on which fasting is prohibited, following its [prior] obligation, so it is recommended to hasten to break the fast, to demonstrate eagerness for the obedience of Allah the Almighty and compliance with His command to break the fast, contrary to the usual practice; the day of al-Adha is the opposite. This is also because in al-Adha, the sacrifice is prescribed, as is eating from it, so it is recommended that one's first meal be of it. Ahmad said: On al-Adha, one should not eat until he returns, if he has a sacrificial animal; because the Prophet, peace and blessings of Allah be upon him, ate from his sacrificial animal (4). If he does not have a sacrifice, there is no harm in him eating.
Section: It is recommended to break the fast with dates, because the Prophet, peace and blessings of Allah be upon him, used to break his fast with them and would eat them in an odd number, [due to the statement of Anas: And he would eat them in an odd number] (5). This is also because Allah the Almighty is Witr (Odd/One) and loves the odd number, and it is recommended for the fasting person to break his fast in such a way.
(1) In: The Chapter on Eating on the Day of al-Fitr before Going Out, from the Book of the Two Eids. Sahih al-Bukhari 2/21. Also narrated by Ibn Majah, in: The Chapter on Eating on the Day of al-Fitr before Going Out, from the Book of Fasting. Sunan Ibn Majah 1/558, without the last addition. (2) In [manuscript] M: "wa ya'kuluhunna" (and he eats them) is an error. (3) Narrated by al-Tirmidhi, in: The Chapter on what has been narrated regarding eating on the day of al-Fitr before going out, from the Chapters on the Two Eids. 'Aridat al-Ahwadhi 3/12. Also narrated by Ibn Majah, in: The Chapter on Eating on the Day of al-Fitr before Going Out, from the Book of Fasting. Sunan Ibn Majah 1/558. Al-Darimi, in: The Chapter on Eating before Going Out on the Day of Eid, from the Book of Prayer. Sunan al-Darimi 1/375. And Imam Ahmad, in: al-Musnad 5/360. (4) Narrated by al-Daraqutni, in: The beginning of the Book of the Two Eids. Sunan al-Daraqutni 2/45. And al-Bayhaqi, in: The Chapter on refraining from eating on the Day of Sacrifice until one returns, from the Book of Eid Prayers. al-Sunan al-Kubra 3/283. (5) Omitted from: A. The hadith was mentioned just a short while ago.