The Messenger of Allah ﷺ said, "Seek out Laylat al-Qadr in the last seven nights of Ramadan."
حدثنا إسحاق أخبرنا مالك عن عبد الله بن دينار
قال رسول الله ﷺ تحروا ليلة القدر في السبع الأواخر من رمضان
Its isnad is sahih. It is found in the Muwatta, Yahya's recension, 1:298, though the phrase "of Ramadan" does not appear there, but it is confirmed in Muhammad bin Hasan's recension, p. 192. This hadith is an abridgment of 5651.