Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) said that the Prophet (peace and blessings be upon him) was travelling and made camp with his Companions, and some people had put up a shade over a companion of theirs who was fasting. The Messenger of Allah (peace and blessings be upon him) passed by them and said: "What is the matter with your companion? Is he ill?" They said: No, O Messenger of Allah, but he is fasting; and that was an intensely hot day. So the Messenger of Allah (peace and blessings be upon him) said: "It is not righteousness to fast while travelling."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13706