Salama bin Akwa reported,

During Ramadan in the time of the Messenger of Allah ﷺ, whoever wished would fast and whoever wished would break the fast and compensate by feeding a poor person, until this verse was revealed, "So whoever among you witnesses the month, let him fast it" [Baqarah 2:185].

Muslim 2686

Sahih

حدثني عمرو بن سواد العامري أخبرنا عبد الله بن وهب أخبرنا عمرو بن الحارث عن بكير بن الأشج عن يزيد مولى سلمة بن الأكوع

عن سلمة بن الأكوع رضي الله عنه أنه قال

كنا في رمضان على عهد رسول الله ﷺ من شاء صام ومن شاء أفطر فافتدى بطعام مسكين حتى أنزلت هذه الآية {فمن شهد منكم الشهر فليصمه}

مسلم 2686صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Fasting
Chapter
Clarification of the abrogation of His saying "And upon those who are able to fast it" a fidya, by His saying "So whoever witnesses the month, let him fast it"
Numbering
Darussalam 2686
Muslim 2686