Ziyad related to me from Malik from Nafi from Ibn 'Umar that some of the companions of the Messenger of Allah ﷺ were shown Laylat al-Qadr in their sleep during the last seven days. The Messenger of Allah ﷺ said, "I see that your visions agree about the last seven days, so whoever is searching for it should do so in the last seven days."
أَنَّ رِجَالاً مِنْ أَصْحَابِ رَسُولِ اللَّهِ ﷺ أُرُوا لَيْلَةَ الْقَدْرِ فِي الْمَنَامِ فِي السَّبْعِ الأَوَاخِرِ فَقَالَ رَسُولُ اللَّهِ ﷺ إِنِّي أَرَى رُؤْيَاكُمْ قَدْ تَوَاطَأَتْ فِي السَّبْعِ الأَوَاخِرِ فَمَنْ كَانَ مُتَحَرِّيَهَا فَلْيَتَحَرَّهَا فِي السَّبْعِ الأَوَاخِرِ