Context. There is a lack of state-of-the-art information on very young open clusters with implications for determining the structure of the Galaxy. Aims. Our main objective is to study the timing and location of the star formation processes which yielded the generation of the giant HII region Sh 2-284. This includes the determination of different physical variables of the stars, such as distance, reddening, age and evolutionary stage, including pre-main-sequence (PMS) stars. Methods. The analysis is based on UBVR C I C CCD measurements of a field of 6.5 × 6.5 containing the cluster, and JHK s photometry in the 3.5 × 3.5 subfield, centered in the apparent higher condensation. The determination of cluster distance, reddening and age is carried out through a comparison with ZAMS, post-MS and PMS isochrones. The reference lines used are obtained from theoretical post-MS and PMS isochrones from the Geneva and Yale groups for a metallicity of Z = 0.004, which agrees with the spectroscopic metallicity determination published for several cluster members. Results. The results amount to E(B − V) = 0.78 ± 0.02, DM = 12.8 ± 0.2 (3.6 kpc), Log Age(yr) = 6.51 ± 0.07 (3.2 Myr). The distance result critically depends on the use of low metallicity ZAMS and isochrones. A PMS member sequence is proposed, with an age of Log Age(yr) = 6.7 ± 0.2 (4.7 Myr) which is therefore coeval within the errors with the post-MS cluster age. The mass function for this population in the mass range above 1.3−3.5 M is well fitted by a Salpeter mass function. The presence of a different star generation in the cluster with a distinctly older age of around 40 Myr is suggested. On the other hand, the NIR photometry results indicate a large number of sources with (H − K s ) excess, practically distinct from the optical PMS candidate members. Conclusions. The analysis of our deep UBVRIJHK photometry of Dolidze 25 therefore reveals a young cluster with coeval MS and PMS populations of age 3.2−5 Myr. In addition, a distinctly older cluster member population of the age of 40 Myr is suggested. The distance determined for the cluster from quantitative fits to ZAMS and isochrones is distinctly lower than previously published values. This result originates in the consistent use of low metallicity models for ZAMS fitting, applying published metallicity values for the cluster.