The baby should ideally be on the mother’s milk for a period of two years. Every child has a right to be on breast-feeding for two years, which Allah has granted to it. Allah says in the Qur’an:
"Mothers should feed their milk to the children for two years." (2:233)
If the mother has to wean the child earlier than two years, she is permitted to do it but not earlier than twenty-one months of feeding.
Imam as-Sadiq says:
“The period of the mother feeding the child should be a minimum of twenty one months. If someone feeds the child for a lesser period, it will be causing a hardship to the child."1
In the two years of feeding by the mother, the child slowly gets used to consuming other types of food. In this period the mother can taper down the breast-feeding and substitute it with other nutritive foods. After the period of breast-feeding is over the child is weaned. Now it will get ready to have other type of nutrition. Careful and informed mothers know the type of foods on which their children can be fed. These foods have to suit the nature of the child and should have good nutritive value.
Weaning the child from the breast is however not an easy task. For some days it will cry and crave for the breast-feeding. At this juncture the mother has to exercise a lot of patience and tact. The mothers sometimes try to apply some bitter material on their nipples or color the breasts black that the child develops an aversion for feeding on it. But care has to be taken not to scare the child. The child should not get a fear complex during weaning that it can have wrong effect on its health and psychology.