But Allah would give them whatever they needed any time.
But Allah would give them whatever they needed any time. It is important to understand that what the prophets or the Imams wish to know is exactly what Allah wished to release to them. They do not wish to know anything that Allah do not want to release to them (among which is the keys to the knowledge of unseen). Based on Quran and the transmitted traditions by Ahlul-Bayt, Allah has two types of knowledge: 1- The knowledge that is withheld (i.e., Ghayb).
As I mentioned Nobody has control over this type of knowledge except Allah. Allah may inform "a news from Ghayb" to some of His servants, but this is different than "possessing Ghayb". In fact, there is a whole chapter in Usul al-Kafi which discusses this type of knowledge where it is clearly mentioned that neither the Imams nor the prophets possess the knowledge Ghayb. "The Will (Mashiyyah) of Allah operates on this knowledge. If He wishes He decrees it.
And If He wishes He modifies it and does not carry it out." (See Usul al-Kafi, Kitab al-Hujjah, Tradition #664) 2- The knowledge that is granted. "This is the knowledge that Allah fore- ordained (Qadar, Taqdeer), He decrees it, and carries it out (with no modification).
And this is the knowledge that has been passed down to the , and then to the Imams." (See Usul al-Kafi, Kitab al-Hujjah, Tradition #664) If the Prophet or Imams possessed any knowledge about the future, it is this second type of knowledge (the knowledge of what has been foreordained), and NOT the first type of knowledge (the Knowledge of the Unseen).
For the First type of knowledge, Quran states: "Allah removes what He wills, and confirms what He wills, and with Him is the Essence of the Book." (Quran 13:39). The Essence of the Book is the withheld knowledge (Ghayb) which is only possessed by Allah, and nobody possesses this database but Him. Also see the following verses: He said: "The knowledge of that is with my Lord in a Record.
My Lord neither errs nor forgets." (Quran 20:52) Now, let us look at the following verse: "He possesses the Ghayb and He does not discloses His Ghayb to anyone except to such a Messenger as He is well-pleased with." (Quran 72:26- 27). >From the above verse, it is evident that although Allah alone possesses the withheld knowledge (Ghayb), but He may disclose a news from it to (PBUH&HF).