Malik bin Marthad narrates from his father, who said: I said to Sayyiduna Abu Dharr (may Allah be pleased with him): Did you ask the Messenger of Allah (peace and blessings be upon him) about Laylat al-Qadr? He said: I was the one who asked about it the most among people. I said: O Messenger of Allah (peace and blessings be upon him), tell me about Laylat al-Qadr: is it in Ramadan or outside it as well? He (peace and blessings be upon him) said: "No, rather (only) in the month of Ramadan." I said: O Prophet of Allah (peace and blessings be upon him), is it connected with the prophets, so that when they are taken (in death) this night is also taken up with them, or does it remain until the Day of Resurrection? He (peace and blessings be upon him) said: "No, rather it remains until the Day of Resurrection." He said: I said: Tell me in which part of Ramadan it is. He (peace and blessings be upon him) said: "Seek it in the first ten and in the last ten (days) as well." Then the Prophet of Allah (peace and blessings be upon him) spoke and spoke at length, and I seized a moment when his attention was elsewhere and said: O Prophet of Allah (peace and blessings be upon him), tell me in which ten it is. He (peace and blessings be upon him) said: "Seek it in the last ten, and do not ask me about anything after this." Then he spoke and spoke at length, and I seized a moment when his attention was elsewhere and said: I adjure you, O Messenger of Allah, by my right over you, to tell me in which of the ten it is. The Messenger of Allah (peace and blessings be upon him) became angry with me with an anger such as he had never shown me before or after, then he said: "Seek it in the last seven, and do not ask me about anything after this."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8525
Abdullah bin Umar (may Allah be pleased with them both) narrates that the Messenger of Allah (peace and blessings be upon him) was asked about Laylat al-Qadr while I was listening, and he (peace and blessings be upon him) said: "It is in every Ramadan."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8526