It is narrated from Sayyidah Buhayyah (may Allah be pleased with her): I heard a woman asking Sayyidah Aishah (may Allah be pleased with her) about menstruation; she did not know how to pray. Sayyidah Aishah (may Allah be pleased with her) said: I asked the Messenger of Allah (peace and blessings be upon him) about a woman whose menstruation had become disordered and who kept bleeding, and she did not know how to pray. The Messenger of Allah (peace and blessings be upon him) instructed me to tell her: "She should wait as long as she used to menstruate each month, and that is her proper menstruation; then she should count that as her habit."
In the hadith of Isma'il it says: "She should sit and estimate that in days and nights and abandon the prayer, then take a ritual bath and purify herself well, then bind herself with a cloth, then pray. I hope that this is from Satan, and that, if Allah wills, Allah will take it away from you." She said: I instructed her, she did so, and Allah Almighty removed her ailment. So you too instruct your companions with this.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحيض / 1575