Sahih al-Bukhari, Book 77, Hadith 70 (Bukhari 5626)

Narrated Ibn `Abbas:

The Prophet (ﷺ) said, "Whoever has no Izar (waist sheet), can wear trousers; and whoever has no sandals, can wear Khuffs (socks made from thick fabric or leather, but cut them short below the ankles)."