All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The scholars disagree on when to transfer the custodianship of a child from his or her mother to the father. According to the Hanafi School of jurisprudence, the child should remain under the custodianship of his mother until the male child can do without his mother's custodianship; an age which some scholars estimate to be seven. With regard to the female child, she remains under the custodianship of her mother until she menstruates. When the male or the female child reaches this age, his or her custodianship should be transferred to the father because the child at this age needs education and refinement, and the man is in the better position to give it.
As regards maintenance, the scholars are unanimous that a woman who is revocably divorced is entitled to housing, maintenance, clothing and whatever she needs for her sustenance as long as she is in the waiting period (Iddah) or pregnant. When her Iddah expires, she is no longer entitled to either alimony or shelter.
As for this woman's rejection of the maintenance for this child and other gifts presented by his father, then that is unlawful. The child's father should make people witness her refusal of this and the judge should be informed about this so that he could compel her to do that.
However, we would like to draw the attention of all to the fact that it is the Islamic court that has more right to look into such cases. If Islamic courts are not available, the scholars and rational people should look into the case.
For more benefit on the custody of children, please refer to Fataawa 341287, 84575, and 89832.
Allah knows best.