كتاب الصوم
7  
Fasting
(10b)
Chapter: Private Devotional Exercises in a Mosque - Section 2
(9)
باب الاعتكاف - الفصل الثاني
Mishkat al-Masabih 2106
She said that the sunna for one who is observing a period of private devotion in a mosque is not to visit an invalid, or attend a funeral, or touch or embrace one’s wife, or go out for anything but necessary purposes. There is no period of private devotion in a mosque without fasting, and it must be carried out in a congregational mosque. Abu Dawud transmitted it.
وَعَن عَائِشَة رَضِي الله عَنْهَا قَالَتْ: السُّنَّةُ عَلَى الْمُعْتَكِفِ أَنْ لَا يَعُودَ مَرِيضًا وَلَا يَشْهَدُ جِنَازَةً وَلَا يَمَسُّ الْمَرْأَةَ وَلَا يُبَاشِرُهَا وَلَا يَخْرُجُ لِحَاجَةٍ إِلَّا لِمَا لابد مِنْهُ وَلَا اعْتِكَافَ إِلَّا بِصَوْمٍ وَلَا اعْتِكَافَ إِلَّا فِي مَسْجِدٍ جَامِعٍ. رَوَاهُ أَبُو دَاوُدَ
Reference : Mishkat al-Masabih 2106
In-book reference : Book 7, Hadith 146