Whenever Umm Atiya mentioned the Messenger of Allah ﷺ, she would say, "May my father be sacrificed for him."I asked her, "Did you hear the Messenger of Allah ﷺ say such-and-such?"She replied, "Yes, may my father be sacrificed for him. He said, 'Let the young unmarried girls, the secluded maidens, and the menstruating women come out so they may witness the good and the supplication of the Muslims. But the menstruating women should keep away from the prayer area.'"
أخبرنا عمرو بن زرارة قال أنبأنا إسمعيل عن أيوب
كانت أم عطية لا تذكر رسول الله ﷺ إلا قالت بأبا فقلت أسمعت رسول الله ﷺ يقول كذا وكذا قالت نعم بأبا قال لتخرج العواتق وذوات الخدور والحيض فيشهدن الخير ودعوة المسلمين وتعتزل الحيض المصلى
Bukhari narrated it, Hajj, chapter on the menstruating woman performing all the Hajj rites except tawaf around the House, etc., hadith no. 1652, from the hadith of Ismail bin Ulaya. And Muslim narrated it, Prayer of the Two Eids, chapter on the permissibility of women going out to the prayer ground on the two Eids, etc., hadith no. 890, from the hadith of Hafsa, with the same wording.