(Imām Bukhārī narrates): Muhammad, who is Ibn Salam, narrated to us, he said: Abdul Wahab informed us, from Ayyub, from Hafsa, she says that
we used to forbid our young unmarried women from going to the Eid prayer ground; then a woman came and stayed at the palace of Banu Khalaf; she narrated a hadith from her sister; her sister's husband had participated in twelve military campaigns with the Prophet ﷺ, and my sister participated in six campaigns with her husband. She said: We used to treat the wounded and take care of the sick. Then my sister asked the Prophet ﷺ: Is there any harm upon any of us if she does not go out because she has no cloak? He said: Her companion should lend her a cloak, and she should attend the occasions of good deeds and the dua of the Muslims. Then when Hazrat Umm Atiyyah (may Allāh be pleased with her) came, I asked her: Did you hear this from the Prophet ﷺ? She said: Yes! May my father be sacrificed for you! And whenever she mentioned him, she would say: May my father be sacrificed for you! I heard him saying: Young women and secluded women should go out — or young secluded women and menstruating women should go out — and attend the occasions of good and the dua of the Muslims, and menstruating women should stay away from the actual prayer ground. Hafsa says: I said: Menstruating women? That woman said: Do they not go to the plain of Arafat and such-and-such places?
Reference: Sahih Al Bukhari 324