Reference: Fataawa Ramadhaan – Volume 1, Page 346-347, Fatwa No.295
Fataawa Ibn ‘Uthaymeen – Volume 1, Page 495
Question: If a woman came on her menses just after sunset, what is the ruling regarding her fast?
Response: Our response regarding this is that her fast is valid, even if she felt the onset of her menses before sunset from a feeling of hunger and pain but did not see anything come out until after sunset, then certainly her fast is valid. This is because that which invalidates the fast is the flowing out of menses blood and not [just] the feeling [of its onset].
And we know about many women who take these pills [to prevent the onset of the menses] that their menses become unsettled and changed and they become fatigued. So that which we advise [them] with is never to take these pills, not in Ramadhaan and nor at any other time.