All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
In his book At-Tabaqaat, Ibn Sa`d mentioned that `Ali ibn Abi Taalib married Faatimah in Rajab five months after the Prophet's arrival in Madeenah, and consummated his marriage with her when he returned from the Battle of Badr. The Battle of Khaybar, however, took place in the sixth year after Hijrah. Therefore, ‘Ali was married to Faatimah both, when the Prophet, sallallaahu ‘alayhi wa sallam, sent him to Khaybar.
Allaah Knows best.