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, Messenger of Allah ﷺ said, "Whoever wishes to fast (on the day of 'Ashura') may do so; and whoever wishes to leave it can do so." (Using translation from Bukhārī 1592)
أَنْ يُفْرَضَ رَمَضَانُ وَكَانَ يوماً فِيهِ تُسْتَرُ الْكَعْبَةُ فَلَمَّا فَرَضَ اللهُ ﷻ رَمَضَانَ قَالَ رَسُولُ اللهِ ﷺ مَنْ شَاءَ أَنْ يَصُومَهُ فَلْيَصُمْهُ وَمَنْ شَاءَ أَنْ يَتْرُكَهُ فَلْيَتْرُكْهُ