Tafsir Ibn Kathir -> Surah Al-Baqarah -> Fitam (weaning) occurs by Mutual Consent

Allah said:

﴿فَإِنْ أَرَادَا فِصَالاً عَن تَرَاضٍ مِّنْهُمَا وَتَشَاوُرٍ فَلاَ جُنَاحَ عَلَيْهِمَا﴾

(If they both decide on weaning, by mutual consent, and after due consultation, there is no sin on them.)

This Ayah indicates that if the father and the mother decide on the Fitam (weaning) before the two years (of suckling) end, and for a benefit that they duly discuss and agree upon, then there is no sin in this case. So, the Ayah indicates that one parent is not allowed to make this kind of decision without duly consulting the other parent, as stated by Ath-Thawri. The method of mutual consultation protects the child's interests. It is also a mercy from Allah to His servants, for He has legislated the best method for parents to rear their children, and His legislation guides and directs the parents and the children to success. Similarly, Allah said in Surat At-Talaq (chapter 65 in the Qur'an):

﴿فَإِنْ أَرْضَعْنَ لَكُمْ فَـَاتُوهُنَّ أُجُورَهُنَّ وَأْتَمِرُواْ بَيْنَكُمْ بِمَعْرُوفٍ وَإِن تَعَاسَرْتُمْ فَسَتُرْضِعُ لَهُ أُخْرَى﴾

(Then if they give suck to the children for you, give them their due payment, and let each of you accept the advice of the other in a just way. But if you make difficulties for one another, then some other woman may give suck for him (the father of the child).) (65:6)

Allah then said:

﴿وَإِنْ أَرَدتُّمْ أَن تَسْتَرْضِعُواْ أَوْلَـدَكُمْ فَلاَ جُنَاحَ عَلَيْكُمْ إِذَا سَلَّمْتُم مَّآ ءَاتَيْتُم بِالْمَعْرُوفِ﴾

(And if you decide on a foster suckling-mother for your children, there is no sin on you, provided you pay (the mother) what you agreed (to give her) on a reasonable basis.) meaning, if the mother and the father both agree that the father assumes custody of the child due to a circumstance that compels her or allows him to do so, then there is no sin in this case. Hence, the mother is allowed to give up the child and the father is allowed to assume custody of the child. The father should kindly give the mother her expenses for the previous period (during which she reared and suckled the child), and he should seek other women to suckle his child for monetary compensation. Thereafter, Allah said:

﴿وَاتَّقُواْ اللَّهَ﴾

(And fear Allah) meaning, in all of your affairs,

﴿وَاعْلَمُواْ أَنَّ اللَّهَ بِمَا تَعْمَلُونَ بَصِيرٌ﴾

(And know that Allah is All-Seer of what you do.) meaning, none of your affairs or speech escapes His perfect Watch.

﴿وَالَّذِينَ يُتَوَفَّوْنَ مِنكُمْ وَيَذَرُونَ أَزْوَجًا يَتَرَبَّصْنَ بِأَنفُسِهِنَّ أَرْبَعَةَ أَشْهُرٍ وَعَشْرًا فَإِذَا بَلَغْنَ أَجَلَهُنَّ فَلاَ جُنَاحَ عَلَيْكُمْ فِيمَا فَعَلْنَ فِى أَنفُسِهِنَّ بِالْمَعْرُوفِ وَاللَّهُ بِمَا تَعْمَلُونَ خَبِيرٌ ﴾

(234. And those of you who die and leave wives behind them, they (the wives) shall wait (as regards their marriage) for four months and ten days, then when they have fulfilled their term, there is no sin on you if they (the wives) dispose of themselves in a (just and) honorable manner (i.e., they can marry). And Allah is well-acquainted with what you do.)