WHEN TO NAME THE CHILD
The Hadith about when the child is to be named falls into two classes:
1. Those which mention naming the child on the seventh day after the birth. Like the Hadith of Samurah - (RA) who said: Allah's Messenger (SAW) said:
"Every child is held in pledge for his' Aqeeqah which is sacrificed for him on his seventh day, and he is named on it and his head is shaved" (Reported by Ahmad, Abu Dawud and the remaining 3 Sunan)
The Hadith that the Messenger (SAW) ordered that the child be named on the seventh day, that the harm be removed from him and the sacrifice (the 'Aqeeqah) be performed. (Reported by Al-Tirmidhee)
2. And those which indicate naming the child on the day of its birth. From these is the Hadith of Anas (RA) who said: Allah's Messenger (SAW) said:
"A boy was born to me this night and I have given him the name of my forefather Ibrahim. (Reported by Muslim and Abu Dawud)
Allah's Messenger (SAW) also named 'Abdullaah ibn Abee Taihah. (Al-Bukhari and Muslim) Another baby was brought to him after birth and he called it al-Mundhir (Al-Bukhari and Muslim) and there are many examples like this.
So from the previous Hadith we can see that the time for giving the name is something flexible - and all praise and thanks are for Allah (SWT) - so it may be named on the day of the birth, or delayed until the seventh day after birth - just as it is allowed between the two and later on. However, the time when it is recommended to name the child is the seventh day after the birth since that occurs in the words of the
Prophet (SWT) and so it is taken to be a recommendation, and the Hadith mentioning the day of its birth report the Prophet's (SAW) action - and are, therefore, taken to show & what is permissible.
WHO NAMES THE CHILD
The father and mother are the ones who are to choose a good name for their child, but if they disagree about the name, then the father has the right to choose the name. If he wishes, he may name it himself and if he wishes, he may give the choice to his wife, and if he wishes he may draw lots with her.
The fact that naming the child is the right of the father is shown by the fact that the child in this world is ascribed and attributed to his father. Allah (SWT) says:
"Call them (adopted sons) by (the names of) their fathers, that is more just in the Sight of Allah..." (Surah Al-Ahzab 33:5)
They will likewise be ascribed to him on the Day of Resurrection, and he (SAW) said:
"For every treacherous one a banner will be raised saying: This is the treachery of so and so, son of so and so." (Reported by Al-Bukhari and others)
And the Hadith:
"On the Day of Resurrection, you will be called by your names and your fathers names, so make your names good." (Reported by Ahmad, Abu Dawud and other)
It is also allowed for the parents to allow someone else to choose the name his grandfather, or grandmother, or someone else, i.e. that they should say: 'Call him so and so', or 'Your name is so and so', or 'His name is so and so' etc., since our Messenger and teacher Muhammad (SAW) used to name some of the children of his Companions - for example he named 'Abdullah ibn Abee Talhah as has preceded and he said to a man: "Call your son 'Abdur-Rahman." (Reported by Al-Bukhari and Muslim) And just as he named his grand children - the children of Fatimah. Her husband Ali (RA) said: "When al-Hasan was born, I called him Harb (war), then the Prophet (SAW) came and said: "Show me my son, what have you called him?" We said: "Harb." He said, "Rather he is Hasan." Then when al-Husayn was born I called him Harb, then the Prophet (SAW) came and said, "Show me my son, what have you called him?" We said, "Harb." He said, "Rather he is Husayn." Then the third was born I called him Harb, then the Prophet (SAW) came and said, "Show me my son, what have you called him?" We said, "Harb." He said, "Rather he is Muhassin." Then he said, " I have called them with the names of the children of Haaroon: Shabbar and Shabeer and Mushabbir." (Reported by Ahmad and Al-Bukhari in al-Adabul-Mufrad and declared Sahih by al-Haafiz in al-Isaabah. Declared weak by Shaikh al-Albaanee in his checking of: al-Adabul-Mufrad)
THE RULING FOR NAMING THE MISCARRIED FETUS AND THE ONE WHO DIES BEFORE BIENG NAMED
If it happens that the new-born child dies before it is named, then it is prescribed to give the child a name in this case - just as other children are named, and Funeral Prayer is said upon him, and the rulings for the deceased apply to him. As regards the fetus that is miscarried before the completion of six months - and that is the earliest that life would have been possible for it - then the scholars of the Shaafi'ees and the Hanbalees hold that it is recommended to name him, and they add that if the sex of the fetus is unclear then it should be given a name suitable for either such as: Talhah, Rajaa, Hind and Tarafah. Their support for the first and second questions is that the child will be called on the Day of Resurrection by his name, and this is a good and reasonable argument - if Allah (SWT) wills.
It should also be noted that there are some Hadith reported concerning the encouragement to name the miscarried fetus, however, nothing from them is authentic - and Allah (SWT) knows best.