It was narrated from Ibn 'Umar that 'Umar had vowed -during the Jahiliyyah- to spend a day in 'Itikaf. He asked the Messenger of Allah about that, and he commanded him to perform the 'Itikaf.
Sunan an-Nasa'i Book 35, Hadith 62