I heard al-Bara' saying: We prayed with the Messenger of Allah ﷺ (with our faces) towards Bait-ul-Maqdis for sixteen months or seventeen months. Then we were made to change (our direction) towards the Ka'ba.
سَمِعْتُ الْبَرَاءَ يَقُولُ صَلَّيْنَا مَعَ رَسُولِ اللَّهِ ﷺ نَحْوَ بَيْتِ الْمَقْدِسِ سِتَّةَ عَشَرَ شَهْرًا أَوْ سَبْعَةَ عَشَرَ شَهْرًا ثُمَّ صُرِفْنَا نَحْوَ الْكَعْبَةِ