In the time of the Messenger of Allah ﷺ there was a woman who had an issue of blood. So Umm Salamah asked the Messenger of Allah ﷺ to give a decision about her. He said: She should consider the number of nights and days during which she used to menstruate each month before she was afflicted with this trouble and abandon prayer during that period each month. When those days and nights are over, she should take a bath, tie a cloth over her private parts and pray. (Using translation from Abū Dāʾūd 274)
عَنْ أُمِّ سَلَمَةَ زَوْجِ النَّبِيِّ ﷺ أَنَّ امْرَأَةً كَانَتْ تُهَرَاقُ الدَّمَ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ فَاسْتَفْتَتْ لَهَا أُمُّ سَلَمَةَ زَوْجُ النَّبِيِّ ﷺ النَّبِيَّ ﷺ فَقَالَ لِتَنْظُرْ عِدَّةَ اللَّيَالِي وَالْأَيَّامِ الَّتِي كَانَتْ تَحِيضُهُنَّ مِنَ الشَّهْرِ قَبْلَ أَنْ يُصِيبَهَا الَّذِي أَصَابَهَا فَلْتَتْرُكِ الصَّلَاةَ قَدْرَ ذَلِكَ مِنَ الشَّهْرِ فَإِذَا بَلَغَتْ ذَلِكَ فَلْتَغْتَسِلْ ثُمَّ تَسْتَثْفِرْ بِثَوْبٍ ثُمَّ تُصَلِّي