Narrated Jundub bin Sufyan Al-Bajali
Once during the lifetime of Allah's Messenger (ﷺ) we offered some animals as sacrifices. Some people slaughtered their sacrifices before the (Id) prayer, so when the Prophet (ﷺ) finished his prayer, he saw that they had slaughtered their sacrifices before the prayer. He said, "Whoever has slaughtered (his sacrifice) before the prayer, should slaughter (another sacrifice) in lieu of it; and whoever has not yet slaughtered it till we have prayed; should slaughter (it) by mentioning Allah's Name."