Within an isospin- and momentum-dependent transport model, we investigate the necessity of selfconsistent calculations for the electromagnetic field in probing the nuclear symmetry energy using pion observables in heavy-ion collisions at intermediate energies. To this end, we perform the $^{96}$Ru + $^{96}$Ru collisions at 400 MeV/nucleon with two calculations scenarios for the electromagnetic field including the selfconsistent calculation and the most used Li{e}nard-Wiechert formula, while the latter is a simplified one of the complete Li{e}nard-Wiechert formula by neglecting the radiation field for practical calculations in heavy-ion collisions at intermediate and/or relativistic energies. As a comparison, we also consider the static Coulomb field formula for calculations of the electromagnetic field in heavy-ion collisions. It is shown that the most used simplified Li{e}nard-Wiechert formula is not enough for the electromagnetic field calculation because the absent radiation field in this formula also affects significantly the charged pions as well as their $pi^{-}/pi^{+}$ ratio. Moreover, we also examine effects of the electromagnetic field in these scenarios on the double $pi^{-}/pi^{+}$ ratio of two isobar reaction systems of $^{96}$Ru + $^{96}$Ru and $^{96}$Zr + $^{96}$Zr at 400 MeV/nucleon. It is shown that the double $pi^{-}/pi^{+}$ ratio of two reactions tends to be less affected by the electromagnetic field calculation scenario and thus can still be an effective probe of the nuclear symmetry energy in heavy-ion collisions. Therefore, according to these findings, it is suggested that the selfconsistent calculation for the electromagnetic field should be carefully taken into account when using the pion observables to probe the nuclear symmetry energy in heavy-ion collisions.