Language:
كتاب الحج
25  
Hajj (Pilgrimage)
(47)
Chapter: The Statement of Allah Most High: "Allah has made the Ka’bah—the Sacred House—a sanctuary of well-being for all people, along with the sacred months, the sacrificial animals, and the ˹offerings decorated with˺ garlands. All this so you may know that Allah knows whatever is in the heavens and whatever is on the earth, and that He has ˹perfect˺ knowledge of everything."
(47)
بَابُ قَوْلِ اللَّهِ تَعَالَى: {جَعَلَ اللَّهُ الْكَعْبَةَ الْبَيْتَ الْحَرَامَ قِيَامًا لِلنَّاسِ وَالشَّهْرَ الْحَرَامَ وَالْهَدْيَ وَالْقَلاَئِدَ ذَلِكَ لِتَعْلَمُوا أَنَّ اللَّهَ يَعْلَمُ مَا فِي السَّمَوَاتِ وَمَا فِي الأَرْضِ وَأَنَّ اللَّهَ بِكُلِّ شَيْءٍ عَلِيمٌ}
Sahih al-Bukhari 1592

Narrated `Aisha:

The people used to fast on 'Ashura (the tenth day of the month of Muharram) before the fasting of Ramadan was made obligatory. And on that day the Ka`ba used to be covered with a cover. When Allah made the fasting of the month of Ramadan compulsory, Allah's Messenger (ﷺ) said, "Whoever wishes to fast (on the day of 'Ashura') may do so; and whoever wishes to leave it can do so."

حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، حَدَّثَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عُرْوَةَ، عَنْ عَائِشَةَ ـ رضى الله عنها ـ‏.‏ وَحَدَّثَنِي مُحَمَّدُ بْنُ مُقَاتِلٍ، قَالَ أَخْبَرَنِي عَبْدُ اللَّهِ ـ هُوَ ابْنُ الْمُبَارَكِ ـ قَالَ أَخْبَرَنَا مُحَمَّدُ بْنُ أَبِي حَفْصَةَ، عَنِ الزُّهْرِيِّ، عَنْ عُرْوَةَ، عَنْ عَائِشَةَ ـ رضى الله عنها ـ قَالَتْ كَانُوا يَصُومُونَ عَاشُورَاءَ قَبْلَ أَنْ يُفْرَضَ رَمَضَانُ، وَكَانَ يَوْمًا تُسْتَرُ فِيهِ الْكَعْبَةُ، فَلَمَّا فَرَضَ اللَّهُ رَمَضَانَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ شَاءَ أَنْ يَصُومَهُ فَلْيَصُمْهُ، وَمَنْ شَاءَ أَنْ يَتْرُكَهُ فَلْيَتْرُكْهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1592
In-book reference : Book 25, Hadith 78
USC-MSA web (English) reference : Vol. 2, Book 26, Hadith 662
  (deprecated numbering scheme)