Sayyiduna Jabir bin Abdullah al-Ansari (may Allah be pleased with them both) said that the Prophet (peace and blessings be upon him) was on a journey when he (peace and blessings be upon him) saw a crowd at a place and saw a man over whom shade had been made. He (peace and blessings be upon him) said: "What is this?" They said: This man is fasting. So the Messenger of Allah (peace and blessings be upon him) said: "Fasting on a journey is not righteousness."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8154