Sayyiduna Salamah bin Akwa’ (may Allah be pleased with him) narrates: In the blessed time of the Prophet (peace and blessings of Allah be upon him), we used to fast in Ramadan in such a way that whoever wished would fast and whoever wished would leave the fast, and would give fidyah by feeding a poor person, until this verse was revealed: “Whoever among you witnesses the month of Ramadan, then he should fast in it.”
Hadith Referenceصحیح ابن حبان / كتاب الصوم / 3624
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «صحيح أبي داود» (2005): ق.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم