Umm Atiya reported,

We were commanded to go out, and we would bring out the menstruating women, the young unmarried women, and the secluded virgins. Ibn Awn said, "Or the young unmarried secluded virgins." As for the menstruating women, they would witness the gathering of the Muslims and their supplications, but would keep away from the place of prayer.

Bukhari 981

Sahih

حدثنا محمد بن المثنى قال حدثنا ابن أبي عدي عن ابن عون عن محمد قال قالت

أم عطية

أمرنا أن نخرج فنخرج الحيض والعواتق وذوات الخدور قال ابن عون أو العواتق ذوات الخدور فأما الحيض فيشهدن جماعة المسلمين ودعوتهم ويعتزلن مصلاهم

البخاري 981صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Two Eids
Chapter
Menstruating women staying away from the prayer place
Numbering
Darussalam 981
Bukhari 981