It is narrated from Sayyiduna Ali (may Allah be pleased with him), he states that during the time of the Prophet (peace and blessings be upon him), we would not perform any prayer in the mosque on the days of Eid al-Fitr and Eid al-Adha (after the Fajr prayer) until we arrived at the Eid ground, and when we returned from the Eid ground, we would pass by the mosque and perform prayer in it.
Hadith Referenceمسند الإمام الشافعي / كتاب العيدين والأضاحي والاستسقاء / 483
Hadith Takhrijاسنادہ ضعیف جداً، لضعف شیخ الشافعی ولضعف عبد اللہ بن محمد بن عقیل، اخرجـہ البیہقی فی معرفۃ السنن والآثار (1930)۔