Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:17204al-Miqdām b. Dāwud > Asad b. Mūsá > Ḥammād b. Salamah > Hishām b. ʿUrwah from his father > al-Miswar

[Machine] That Subay'ah bint al-Harith passed away and her husband died. She gave birth after eight or seven (months). So the Messenger of Allah ﷺ commanded her to get married.  

الطبراني:١٧٢٠٤حَدَّثَنَا الْمِقْدَامُ بْنُ دَاوُدَ ثنا أَسَدُ بْنُ مُوسَى ثنا حَمَّادُ بْنُ سَلَمَةَ عَنْ هِشَامِ بْنِ عُرْوَةَ عَنْ أَبِيهِ عَنِ الْمِسْوَرِ

أَنَّ سُبَيْعَةَ بِنْتَ الْحَارِثِ تُوُفِّيَ عَنْهَا زَوْجُهَا فَوَلَدَتْ بَعْدَ ثَمَانٍ أَوْ سَبْعٍ «فَأَمَرَهَا رَسُولُ اللهِ ﷺ أَنْ تَتَزَوَّجَ»  


See similar narrations below:

Collected by Dārimī
darimi:2326Muḥammad b. Yūsuf > Sufyān > Yaḥyá b. Saʿīd > Sulaymān b. Yasār > Kurayb > Um Salamah

"Subai'ah gave birth a few days after her husband died, and the Messenger of Allah told her to get married." (Using translation from Nasāʾī 3513)   

الدارمي:٢٣٢٦أَخْبَرَنَا مُحَمَّدُ بْنُ يُوسُفَ حَدَّثَنَا سُفْيَانُ عَنْ يَحْيَى بْنِ سَعِيدٍ عَنْ سُلَيْمَانَ بْنِ يَسَارٍ عَنْ كُرَيْبٍ عَنْ أُمِّ سَلَمَةَ قَالَتْ

تُوُفِّيَ زَوْجُ سُبَيْعَةَ بِنْتِ الْحَارِثِ فَوَضَعَتْ بَعْدَ وَفَاةِ زَوْجِهَا بِأَيَّامٍ «فَأَمَرَهَا رَسُولُ اللَّهِ ﷺ أَنْ تَتَزَوَّجَ»