It was narrated from ‘Amr bin Shu’aib, from his father, that his grandfather said:“I saw the Messenger of Allah (ﷺ) performing prayer both barefoot, and while wearing sandals.”
حَدَّثَنَا بِشْرُ بْنُ هِلاَلٍ الصَّوَّافُ، حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، عَنْ حُسَيْنٍ الْمُعَلِّمِ، عَنْ عَمْرِو بْنِ شُعَيْبٍ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، قَالَ رَأَيْتُ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ يُصَلِّي حَافِيًا وَمُنْتَعِلاً .
IbnMaja
Establishing the Prayer and the Sunnah Regarding Them • Hadith 1038