All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Shaving the hair or clipping the nails is forbidden only for a person who has already assumed Ihraam for Hajj or ‘Umrah. If, for example, one assumes Ihraam on the eighth day of Thul-Hijjah, then he is forbidden to shave his hair and clip his/her nails. Before that date, one is not forbidden to shave his hair or clip his/her nails. Some scholars say that shaving hair and clipping nails is a recommended act when wanting to assume Ihraam. However, people who intend to slaughter Udh-hiyah (both pilgrims in the state of Ihraam and others) are forbidden from this starting from the beginning of Thul-Hijjah. Shaafi‘i scholars argue that this forbiddance implies being not recommended; whereas Hanbali scholars argue that it implies unlawfulness. It is narrated on the authority of Umm Salamah that the Prophet, sallallaahu ‘alayhi wa sallam, said, “When the [first] ten days of Thul-Hijjah commence and anyone of you intends to offer a sacrificial animal (Udh-hiyah), should not touch his hair (i.e. trim it, cut it or shave it) nor clip his nails.” [Muslim]
Allaah Knows best.