It is essential to make the intention to fast the month of Ramadan at night, before Fajr. It is not sufficient to start fasting it that day without the intention. Whoever finds out at the time of Duha that today it is Ramadan and makes the intention of fasting has to refrain from eating until sunset, and he also has to make up that day, because it was narrated by Ibn âUmar from Hafsah (may Allaah be pleased with her) that the Prophet (peace and blessings of Allaah be upon him) said: âWhoever does not have the intention of fasting before Fajr, there is no fast for him.â Narrated by Imam Ahmad, the authors of al-Sunan, Ibn Khuzaymah and Ibn Hibbaan; they classed it as saheeh and marfooâ.
This is with regard to obligatory fasts. With regard to naafil fasts it is permissible to make the intention to fast on the day, if you have not eaten or drunk or had intercourse after Fajr, because it was proven in the hadeeth of âAaâishah (may Allaah be pleased with her) that the Prophet (peace and blessings of Allaah be upon him) entered upon her one day at duha time and said, âDo you have anything (any food)?â She said, âNo.â He said, âThen I am fasting.â Narrated by Muslim in his Saheeh.
And Allaah is the Source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and his family and companions.
Standing Committee for Research and Issuing Fatwas. 10 / 244