It is unlawful for a menstruating woman to perform all types of fasting: obligatory or optional.
It is, however, obligatory to make up for the missed obligatory days of fasting as explained by ‘Aisha (رضي الله عنها):
“We passed through this (period of menstruation), and we were ordered to complete (i.e., compensate) the fasts but we were not ordered to complete the prayers” (agreed upon Hadeeth) .
If the woman encounters menses while fasting then her fasting is negated even if her blood flow occurs a moment before sunset. If this day is one of the prescribed days of fasting then she must make up for this day once she becomes clean. If on her day of fasting she feels she is about to have her menses but no blood flow actually occurs till after sunset, then her fasting is complete and is not negated in accordance with the right opinion about this matter.
This is because there is no ruling regarding blood inside the woman’s body and because the Prophet (صلى الله عليه و سلم) when asked:
“Is it necessary for a woman to take a bath after she has a wet dream (nocturnal sexual discharge)?”
he replied: “Yes, if she notices a discharge.” 
So, he (صلى الله عليه و سلم) conditioned the ruling upon the actual seeing of the discharge and not upon its transfer (from inside-out). Similarly in the case of Haid, the ruling applies once there is an actual seeing of discharge.
Case: If a woman’s period continues till after dawn (Fajr), then no fasting will be acceptable from her on this day even if she becomes clean moments after dawn.
Case: If she becomes clean before Fajr and she fasted, then her fasting is correct even though she may have not taken her cleaning bath till after Fajr time. This is the same as in the case of the person who has Jannabah. If he (she) intends to fast and did not take his (her) bath until after Fajr, then his (her) fasting on this day is correct. This is in accordance with the Hadeeth of ‘Aisha (رضي الله عنها) who said that:
“The Prophet (صلى الله عليه و سلم) used to get up in a state of Jannabah (after sexual relations with his wives) and fast during the month of Ramadan.” 
 Ibin Taymeeyah in Al-Fatawa (religious decrees) V. 26, P. 191.
 The text is from Saheeh Muslim, V.1, P. 191.
 Saheeh Al-Bukhari (Arabic-English) V.1, P. 171-2, Hadeeth # 280.
 Aisha (رضي الله عنها) said: “The dawn broke upon the Messenger of Allah (صلى الله عليه و سلم) during the Ramadan in a state of Jannabah not becuase of sexual dream
Suppose a woman becomes clean from her menses before Salat Al-Fajr but she took her bath after the commencement of the Salat time, and fasted that day. Is her fasting correct?
Answer by Shaykh Uthaymeen:
If a woman becomes clean during the month of Ramadan one minute before the commencement of the prescribed time of Salat Al-Fajr, then she must fast that day and her fasting is correct and it is not mandatory upon her to make up the fast because she fasted while she was clean even though she did not take her bath till after the rise of Fajr. This is similar to the case when a man has a wet dream or in a state of Jannabah. He can have his Suhor (meal before Fajr), fast and take his bath after Fajr.
I want to caution some women who may think that if they get their menses after breaking the fast and before Isha’ then their fasting was incorrect. This understanding is wrong. Their fasting is correct and complete even if they get their respective periods one moment after sunset (Maghrib).
A woman has reached sixty five years of age. She did not give birth to any child during the last nineteen years. For the past three years she had continuous bleeding. What should she do for fasting and what should women like her do (regarding Salat and Fasting)?
Answer by Shaykh ibn Uthaymeen:
This type of woman should refrain from fasting and Salat during the time of her regular cycle of menses. If for example she used to have her normal period of menses during the first six days of the month, then she should refrain from fasting and praying during the first six days of each month. Once that is done, she should take a bath and perform Salat and fast.
As to the how she offers her Salat, she should wash her private part real well and apply a pad to it and make ablution. She does this at the time of the obligatory prayers. She could also do the same for the optional prayers at times other than the times of the obligatory prayers.
Because of the difficulty encountered by such woman, it is allowable for her to combine (but not shorten) the Thuhr with the ‘Asr prayer (and pray either at time of Thuhr or at time of ‘Asr) and the Maghrib with the Isha’ (and pray either at time of Maghrib or at time of Isha’). This way she can do this type of preparation for her Salat three times (including one for Fajr prayer) instead of five times a day. She can perform optional prayers based upon her ablution for either of the combined prayers.
What should a woman do when she does not make up for the days she did not fast in Ramadan due to her menses?
Answer by Shaykh ibn Uthaymeen:
It is regrettable for something like this to happen amongst the believing women. This is either due to ignorance or laziness and both reasons are wrong! because the cure for ignorance is to ask those who know and the cure for laziness is the fear of Allah and His punishment. So a woman who may have done this should sincerely repent to Allah and seek His forgiveness. She should also try her best to find out the number of days she missed and make up for it. I ask Allah to accept the repentance of such women.
Source: [eBook] Natural Blood of Women – Shaykh Uthaymeen – Dr Saleh As-Saleh