This Halacha is an excerpt from our Sefer
Avoiding dangerous activity during the three weeks:
From on the above laws, which warn against hitting a child, or walking during certain times of the day, we learn that there is an element of danger involved during the period of the three weeks, and that one should abstain from activities that are considered possibly dangerous. While this matter is not explicit in the Shulchan Aruch or its commentaries, nonetheless, it has become accepted and advised to follow. The following are a list of activities and their ruling.
May one go swimming during the three weeks?
It is permitted to go swimming past the 17th of Tammuz, up until Rosh Chodesh Av, the start of the nine days. There is no basis for the notion that one who did not go swimming prior to the 17th of Tammuz, may not go after the 17th, and it is permitted to do even in such a case. Nevertheless, one is to avoid swimming in dangerous areas, such as a dangerous beach or during bad weather and the like. Due to this reason, some are accustomed to completely avoid going swimming, or into a river or ocean, throughout the duration of the three weeks.
May one go on trips during the three weeks?
Some Poskim rule that one is to abstain from going on trips or outings during the three weeks. This includes abstaining from going on pleasure trips to gardens and orchards, the beech, or a river. One must certainly avoid going to areas of possible danger during this time. This especially applies during the period of the nine days
May one travel during the three weeks?
It is permitted to travel during the three weeks, whether by car, bus or plane. However, as stated above, one is to abstain from traveling to dangerous areas, or for the sake of pleasure or a vacation. Thus, one should only travel for necessary purposes, or for the sake of a Mitzvah. This especially applies during the nine days. On one occasion, the Rebbe advised that one who plans to travel during the three weeks, should at least begin his traveling preparations prior to the 17th of Tammuz, such as through packing some of his belongings prior to the 17th.
May one bike ride cross country during the three weeks?
As stated above, one is to abstain from unnecessary travel during the three weeks. This especially applies during the nine days.
May one have surgery during the three weeks?
If the matter is not urgent and one is medically able to differ the surgery to a later date, then one is to avoid surgery during the three weeks. One may schedule the surgery from the 10th of Av and onwards, although preferably, it is to be done after midday of the 10th. If one is unable to delay it until after the three weeks, then it should be done prior to Shabbos Chazon.
 Teshuvos Vehanhagos 2:263; Piskeiy Teshuvos 551:46
 Poskim ibid
 Teshuvos Vehanhagos ibid; Rav Moshe Feinsetin, brought in Moadei Yeshurun 128 footnote 12; Halichos Shlomos 2:14 footnote 7; Koveitz Mibeis Levi 13:22; Rivivos Efraim 3:333; 4:135; 6:285; Shevet Hakehasi 1:169
 Makor Chaim 551:14 “I saw people who abstained from entering a river during the three weeks due to danger”; Orchos Rabbeinu 2:129 in directive of Steipler; Harav Asher Lemel Hakohen
 Sdei Chemed 1:10 in name of Rav Chaim Falagy in Masa Chaim; Piskeiy Teshuvos 551:1
 Makor Chaim 551:14
 See Minchas Elazar 4:54 regarding why by Sefira it is allowed, implying that by Bein Hametzarim it is to be avoided
 Heichal Menachem 2:214, published in Shulchan Menachem 3:49
 Igros Kodesh 19:376; 24:357; Shaareiy Halacha Uminhag 2:225
 Rebbe ibid in Igros Kodesh 19:376; See glosses of Chasam Sofer on M”A 551:2 that after Tisha B’av the Mazal of a Jew shines again
 See Shulchan Menachem 3:50
 Igros Kodesh 19:376