Al-Kāfi - Volume 1 > The Imams (a.s.) do have the knowledge of what was and will be, and that nothing is unknown to them (a.s.)
Hadith #3

3ـ عَلِيُّ بْنُ مُحَمَّدٍ عَنْ سَهْلٍ عَنْ أَحْمَدَ بْنِ مُحَمَّدِ بْنِ أَبِي نَصْرٍ عَنْ عَبْدِ الْكَرِيمِ عَنْ جَمَاعَةَ بْنِ سَعْدٍ الْخَثْعَمِيِّ أَنَّهُ قَالَ كَانَ الْمُفَضَّلُ عِنْدَ أَبِي عَبْدِ الله (عَلَيْهِ السَّلام) فَقَالَ لَهُ الْمُفَضَّلُ جُعِلْتُ فِدَاكَ يَفْرِضُ الله طَاعَةَ عَبْدٍ عَلَى الْعِبَادِ وَيَحْجُبُ عَنْهُ خَبَرَ السَّمَاءِ قَالَ لا الله أَكْرَمُ وَأَرْحَمُ وَأَرْأَفُ بِعِبَادِهِ مِنْ أَنْ يَفْرِضَ طَاعَةَ عَبْدٍ عَلَى الْعِبَادِ ثُمَّ يَحْجُبَ عَنْهُ خَبَرَ السَّمَاءِ صَبَاحاً وَمَسَاءً.

3. Ali ibn Muhammad has narrated from Sahl from Ahmad ibn Muhammad ibn Aabu Nasr from ‘Abd al-Karim from Jama‘a ibn Sa‘d al-Khath‘ami who has said that al-Mufaddal was in the presence of abu ‘Abdallah (a.s.). Al-Mufaddal asked the Imam (a.s.) the following. “May Allah, take my soul in service for your cause, does Allah command (his) servants to obey a servant and hide the news of the heavens from him?” The Imam (a.s.) said, Allah is by far much honorable, kind and caring towards His servants than to command them to obey a servant (of His) and then hide form him the news of the heavens mornings and evenings.”