During the lifetime of Messenger of Allah ﷺ I was shooting my arrows in Medina, when an eclipse of the sun took place. I, therefore, threw them away and said, I must see how the Messenger of Allah ﷺ acts in a solar eclipse today. When I came to him, he had been supplicating with his hands, raised, pronouncing Allah-o-Akbar, praising Him, acknowledging that He is One God till the eclipse was over, then he recited two surahs and prayed two rak'ahs.
بَيْنَمَا أَنَا أَرْمِي بِأَسْهُمِي فِي حَيَاةِ رَسُولِ اللَّهِ ﷺ إِذِ انْكَسَفَتِ الشَّمْسُ فَنَبَذْتُهُنَّ وَقُلْتُ لأَنْظُرَنَّ إِلَى مَا يَحْدُثُ لِرَسُولِ اللَّهِ ﷺ فِي انْكِسَافِ الشَّمْسِ الْيَوْمَ فَانْتَهَيْتُ إِلَيْهِ وَهُوَ رَافِعٌ يَدَيْهِ يَدْعُو وَيُكَبِّرُ وَيَحْمَدُ وَيُهَلِّلُ حَتَّى جُلِّيَ عَنِ الشَّمْسِ فَقَرَأَ سُورَتَيْنِ وَرَكَعَ رَكْعَتَيْنِ