The ground states of electrons in two vertically coupled quantum dots in the presence of an external magnetic field have been studied within the density functional theory. A phase diagram of the transition to the quantum Hall state in double quantum dots has been plotted for the Landau level filling factor. It has been shown that the quantum Hall state can be stable for a zero tunnel splitting. The influence of the impurity potential on the stability condition for the quantum Hall state has been analyzed.