Abdullah bin Abbas reported,

I heard from several of the companions of the Prophet ﷺ, among them Umar bin Khattab, who was the dearest of them to me, that the Messenger of Allah ﷺ forbade prayer after Fajr until the sun rises, and prayer after Asr until the sun sets.

Tirmidhi 183

Sahih

حدثنا أحمد بن منيع حدثنا هشيم أخبرنا منصور وهو ابن زاذان عن قتادة قال أخبرنا أبو العالية

عن ابن عباس قال

سمعت غير واحد من أصحاب النبي ﷺ منهم عمر بن الخطاب وكان من أحبهم إلي أن رسول الله ﷺ نهى عن الصلاة بعد الفجر حتى تطلع الشمس وعن الصلاة بعد العصر حتى تغرب الشمس

الترمذي 183صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
Dislike of prayer after Asr and after Fajr
Numbering
Darussalam 183
Tirmidhi 183