Ayesha reported,

The people used to fast on Ashura before Ramadan was made obligatory. It was a day on which the Kaabah was covered with its cloth. When Allah made Ramadan obligatory, the Messenger of Allah ﷺ said, "Whoever wishes to fast it may fast, and whoever wishes to leave it may leave it."

Bukhari 1592

Sahih

حدثنا يحيى بن بكير حدثنا الليث عن عقيل عن ابن شهاب عن عروة عن عائشة رضي الله عنها ح و حدثني محمد بن مقاتل قال أخبرني عبد الله هو ابن المبارك قال أخبرنا محمد بن أبي حفصة عن الزهري عن عروة

عن عائشة رضي الله عنها قالت

كانوا يصومون عاشوراء قبل أن يفرض رمضان وكان يوما تستر فيه الكعبة فلما فرض الله رمضان قال رسول الله ﷺ من شاء أن يصومه فليصمه ومن شاء أن يتركه فليتركه

البخاري 1592صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hajj
Chapter
Allah's saying, "Allah has made the Kaaba, the Sacred House, a sanctuary for mankind, and the sacred month, and the sacrificial animals, and the garlands. That is so you may know that Allah knows what is in the heavens and what is in the earth, and that Allah is Aleem of all things."
Numbering
Darussalam 1592
Bukhari 1592