Firstlly, we implore Allah, Most High, to make the approaching `Eid al-Fitr a moment of blessing and joy for every Muslim, Amen!
Generally speaking, visiting the graves is permissible at any time particularly for the purpose of being admonished by remembering death and the Hereafter. However, it is undesirable to spoil the joy of `Eid by renewing sorrows on that day. It is better to make the visit on the preceding or subsequent days.
Responding to this issue, Sheikh Ahmad Kutty states:
“Some of the Shafi`i scholars are of the opinion that it is permissible to visit the graves of our parents, relatives, and friends who have died. However, many scholars consider this practice undesirable, especially on the day of `Eid, which is supposed to be a day of celebration and joy. So, it may be a good idea to postpone visiting graves till the next day or to go before the `Eid day.”
Elaborating on the issue of visiting the graves on the day of `Eid, Sheikh `Atiyyah Saqr, former head of Al-Azhar Fatwa Committee, states:
Basically, visiting the graves is Sunnah, as it reminds people of the Hereafter. This is based on the Hadith reported by Imam Muslim on the authority of Abu Hurayrah who said: The Prophet of Allah (may peace and blessings be upon him) visited the grave of his mother and he wept and moved others around him to tears and said: “I sought permission from my Lord to beg forgiveness for her but it was not granted to me, and I sought permission to visit her grave and it was granted to me. So visit the graves, for that makes you mindful of death.”
In an authentic Hadith reported by Ibn Majah, the Prophet (peace and blessings be upon him) said: “In the past I have forbidden you from visiting graves, but now you may do so, for it might remind you of the next world.”
Visiting the graves has no specific time, though some scholars view that there is abundant reward for the visit if it occurs on certain days such as Fridays and Thursdays on the ground that the spirits are much more linked with the dead. However, there is no strong evidence supporting this.
Therefore, we conclude that if people’s visit of the graves after the `Eid Prayer is intended to get admonition and remember those who passed away, there will be nothing wrong with it. However, if visiting the graves on the day of `Eid is for the sake of renewing sorrows and offering and accepting condolences on the grave or at a place prepared for this, then it is reprehensible to do so. This is because giving condolences after three days of burial is reprehensible or forbidden. Also, the day of `Eid is a day of joy, cheerfulness, and enjoyment, so we should not provoke sorrows on that day.