“I still have many things to say to you, but you cannot bear them now. When the Spirit of truth comes, he will guide you into all the truth, for he will not speak on his own authority, but whatever he hears he will speak, and he will declare to you the things that are to come. He will glorify me, for he will take what is mine and declare it to you. All that the Father has is mine; therefore I said that he will take what is mine and declare it to you.
I’m not an advocate of the dictation theory of inspiration, but I do think that revelation by the Holy Spirit did play some part in their knowledge of these stuff. There are even scholars with a more skeptic bent who will theorize (even if they word it quite suspiciously) that perhaps, the knowledge early Christians had about some of the more sketchy aspects of Jesus’ life were acquired in some way via revelation by the risen Jesus/the Spirit. I mean, Jesus didn’t stay dead, did He? And He could still very well have contact with the disciples even after the Ascension.