He shaved his Hair before the 'Eid prayer while he intended to perform the Adhha sacrifice
Question :
What is the ruling on whoever shaved his hair on the day of 'Eidul-Adhha before going to the prayer? This is while knowing that he was advised not to do that, but he persisted in shaving before the prayer.
Answer:
It is forbidden for whoever wants to perform the Adhha sacrifice to shave his hair or cut his nails during all of the 10 days of Thul-Hijjah until he performs the sacrifice. However, if he shaved or clipped his nails, that does not nullify his sacrifice and he does not have to offer a ransom of atonement. He has done wrong in his action, but he should not leave off the sacrifice. And Allâh is the Giver of success.
Source:
Ash-Shaykh Ibn Jibreen
Fatawa Islamiyah, Vol. 4 Pages 327-328