A woman from the tribe of Aslam named Sabia was married to a husband who died while she was pregnant. Abu Sanabil bin Bakak proposed to her, but she refused to marry him.He said, "By Allah, it is not lawful for you to marry him until you complete the longer of the two waiting periods."She waited for about ten nights, then came to the Prophet ﷺ, who said, "Get married."
أن امرأة من أسلم يقال لها سبيعة كان تحت زوجها توفي عنها وهي حبلى، وخطبها أبو السنابل بن بعكك، فأبت أن تنكحه، فقال: والله ما يصلح أن تنكحيه حتى تعتدي آخر الأجلين، فمكثت قريبا من عشر ليال، ثم جاء النبي ﷺ فقال: انكحي.
Bukhari related it in the chapter on divorce (5318), from Yahya bin Bukayr, who said, Layth narrated to us, from Jafar bin Rabia, from Abdul-Rahman bin Hurmuz Araj, who said, Abu Salama bin Abdul-Rahman informed me that Zaynab, daughter of Abu Salama, informed him, from her mother Umm Salama, wife of the Prophet ﷺ, and he mentioned it.