If a woman sees menstrual blood she must stop praying and fasting, and if the bleeding stops during the period it depends:
1 – If traces of blood remain, such that if she inserts a piece of cloth or whatever it comes out with traces of blood, then the period is not regarded as having ended, and she should still refrain from praying and fasting, whether that happens at the beginning of the period or at the end.
2 – If the bleeding stops altogether, such that if she inserts a piece of cloth it comes out clean with no traces of blood, then this is the sign that her period has ended, so she is taahir (pure). She should do ghusl and pray and fast and do all that women who are taahir do. Then if the bleeding resumes she should stop again.
The ruling that being free of any trace of blood during the time of menses is regarded as tuhr (purity) is the view of the Maalikis and Hanbalis.
See Mataalib Ooli al-‘Nuha, 1/260.
In the answer to question no. 37839 we have mentioned the view of the scholars of the Standing Committee:
If the menses stops for one day or one night during the time of menses, then she should do ghusl and pray whatever prayers come when she is taahir, because Ibn ‘Abbaas said: “If she sees blood that is heavy or copious, she should not pray, and if she sees the tuhr for a while, she should do ghusl. End quote.
Majallat al-Buhooth al-‘Ilmiyyah (12/102)
And Allaah knows best.