أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنْ أَيُّوبَ، عَنْ مُحَمَّدٍ، قَالَ لَقِيتُ أُمَّ عَطِيَّةَ فَقُلْتُ لَهَا هَلْ سَمِعْتِ مِنَ النَّبِيِّ صلى الله عليه وسلم وَكَانَتْ إِذَا ذَكَرَتْهُ قَالَتْ بِأَبَا قَالَ ‏"‏ أَخْرِجُوا الْعَوَاتِقَ وَذَوَاتِ الْخُدُورِ فَيَشْهَدْنَ الْعِيدَ وَدَعْوَةَ الْمُسْلِمِينَ وَلْيَعْتَزِلِ الْحُيَّضُ مُصَلَّى النَّاسِ ‏"‏ ‏.‏

It was narrated that Muhammad said: "I met Umm 'Atiyyah and said to her: 'Did you hear the Messenger of Allah (PBUH) say (anything)?' When she mentioned him, she would say: 'May my father be ransomed for him.' (He said) 'Bring out the adolescent girls and the women in seclusion and let them witness goodness and the supplication of the Muslims, but let the menstruating women keep away from the place where the people pray.'" Translation Not Available

Book Ref: Sunan An Nisai Book 19 Hadith 1559
Web Ref:  Sunan An Nisai Vol 2 Book 19 Hadith 1560