Anas (ra), a companion of prophet Muhammad (peace be upon him) reported that when the Prophet Muhammad (PBUH) migrated from Makkah to Madinah, the people of Madinah used to have two festivals. On those two days they had carnivals and festivity. Prophet Muhammad (PBUH) asked the Ansaar (the Muslims of Madinah) about it. They replied that before Islam they used to have carnivals on those two joyous days. The Prophet Muhammad (PBUH) told them: ‘Instead of those two days, Allah has appointed two other days which are better, the days of Eid-al-Fitr and Eid-al-Adha.’ (Hadith)
EID-UL-FITR is celebrated on the first day of Shaw’waal, at the completion of Ramadan. Shaw’waal is the 10th month of the Islamic calendar. The Eid-al-Fitr is a very joyous day; it is a true Thanksgiving Day for the believing men and women. On this day Muslims show their real joy for the health, strength and the opportunities of life, which Allah has given to them to fulfill their obligation of fasting and other good deeds during the blessed month of Ramadan.
Before the day of Eid, during the last few days of Ramadan, each Muslim family gives a determined amount as a donation to the poor. This donation is of actual food -rice, barley, dates, rice, etc.- to ensure that the needy can have a holiday meal and participate in the celebration. This donation is known as sadaqah al-fitr (charity of fast-breaking).
On the day of Eid, Muslims gather early in the morning in outdoor locations or mosques to perform the Eid prayer. This consists of a sermon followed by a short congregational prayer. After the Eid prayer, Muslims usually scatter to visit various family and friends, give gifts (especially to children), and make phone calls to distant relatives to give well-wishes for the holiday. These activities traditionally continue for three days. In most Muslim countries, the entire 3-day period is an official government/school holiday.