Reference: Fadhaa.il al-A’maal – Pages 21-22
Question: If a woman made the intention to fast the 9th and 10th [days] of Muharram, and was then prevented from doing so due to [the onset of] her menses, will she be rewarded for her intention?
Response: If a person was determined to do an act of worship, and was [then] prevented from doing it, then the reward for the act of worship is recorded for him – even if he didn’t do it. And that is based upon what has been transmitted from the hadeeth of Abu Moosaa al-Ash’aree (radhi-yAllaahu ‘anhu) who said: The Messenger of Allaah (sal-Allaahu ‘alayhi wa sallam) said:
«If a person becomes sick or travels, the reward for what he used to do when he was at home and in [a state of] good health will be recorded for him» – transmitted by al-Bukhaaree and Muslim.
And in another hadeeth on the authority of Ibn ‘Abbaas (radhi-yAllaahu ‘anhumaa) that the Prophet (sal-Allaahu ‘alayhi wa sallam) said:
«And whoever thinks of doing a good deed then does not do it, Allaah will write it down as one complete good deed» – transmitted by al-Bukhaaree.
And Allaah [alone] has the Complete knowledge [of all affairs].