Peggy is given a prescription for the contraceptive Enovid by the doctor Joan refers her to in this episode. At the time, she would have needed to know a doctor willing to prescribe them for that purpose, for which they had not yet been approved. Birth control was a highly controversial subject at the time, and it was difficult for researchers to obtain funding needed to develop safe and effective methods of contraception.
Enovid, developed by Searle Laboratories, was the first oral contraceptive approved by the FDA. In 1959, Enovid had been extensively tested as a birth control pill, but was only approved for relief of "menstrual disorders." Not surprisingly, by the end of the year over 1/2 million American women had 'developed' these disorders and were taking Enovid off-label for contraceptive purposes. Enovid was finally approved by the FDA as an oral contraceptive in May, 1960.
The Pilot, when Peggy gets the prescription takes place in May 1960.