I heard it from so many Companions of the Messenger of Allah ﷺ and one among them is 'Umar b. Khattab, and he is most dear to me among them that the Messenger of Allah ﷺ prohibited observing of prayer after the dawn prayer till the sun rose and after the 'Asr till the sun set.
سَمِعْتُ غَيْرَ وَاحِدٍ مِنْ أَصْحَابِ رَسُولِ اللَّهِ ﷺ مِنْهُمْ عُمَرُ بْنُ الْخَطَّابِ وَكَانَ أَحَبَّهُمْ إِلَىَّ أَنَّ رَسُولَ اللَّهِ ﷺ نَهَى عَنِ الصَّلاَةِ بَعْدَ الْفَجْرِ حَتَّى تَطْلُعَ الشَّمْسُ وَبَعْدَ الْعَصْرِ حَتَّى تَغْرُبَ الشَّمْسُ