It is forbidden for a woman to mourn more than three days for anyone except her husband. The mourning period for a husband is four months and ten days

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

354. Chapter: It is forbidden for a woman to mourn more than three days for anyone except her husband. The mourning period for a husband is four months and ten days

1774. Zaynab bint Abi Salama said, "I visited Umm Habiba, the wife of the Prophet, when her father, Abu Sufyan ibn Harb, had died. She called for a yellowy perfume, perhaps khaluq or something else. She first rubbed the perfume on a slave-girl and she then wiped it on the sides of her face and said, 'By Allah! I have no need of perfume but I heard the Messenger of Allah, may Allah bless him and grant him peace, say on the minbar, "It is not lawful for a woman who believes in Allah and the Last Day to abstain from adornment for more than three nights, when mourning for someone who has died, except for the four months and ten days in the case of a husband."'"

Zaynab said, "Then I visited Zaynab bint Jahsh when her brother had died. She called for perfume and put some on and said, 'By Allah! I have no need of perfume, but I heard the Messenger of Allah, may Allah bless him and grant him peace, say, "It is not lawful for a woman who believes in Allah and the Last Day to abstain from adornment for more than three nights, when mourning for someone who has died, except for the four months and ten days in the case of a husband."'" [Agreed upon]