At this time of year when the trees have finished blooming, the dandelions are mostly finished. the risk from pesticide application is the bees picking up the moisture form the spray, and the spray drifting into the hive or onto adjacent flowers.
Spray before the bees start to forage, leave enough time so any moisture can evaporate before the bees start to fly. make sure the spray is not drifting into the hive while applying it.
Or do as I do and cover the hives with a white bed sheets, place a sprinkler on top of the hives and turn it on. Do this before the bees start to fly, then spray and leave the sprinkler running till all the spray mist is dry. Then remove the sprinkler and bed sheet and allow the bees to fly. The water from the sprinkler will wash and dilute any drifting spray from entering the hive. and the bees will stay in the hive as long as they think it is raining.