  In very young clusters, stellar age distribution is the empirical proof of
the duration of star formation (SF) and of the physical mechanisms involved in
the process. We derived accurate stellar ages for the cluster NGC6530,
associated with the Lagoon Nebula to infer its SF history. We use the Gaia-ESO
survey observations and Gaia DR2 data, to derive cluster membership and
fundamental stellar parameters. We identified 652 confirmed and 9 probable
members. The reddening inferred for members and non-members allows us to
distinguish MS stars and giants, in agreement with the distances inferred from
Gaia DR2 data. The foreground and background stars show a spatial pattern that
traces the 3D structure of the nebular dust component. We derive stellar ages
for 382 confirmed cluster members and we find that the gravity-sensitive gamma
index distribution for M stars is correlated with stellar age. For all members
with Teff<5500 K, the mean logarithmic age is 5.84 (units of years) with a
dispersion of 0.36 dex. The age distribution of stars with accretion and/or
disk (CTTSe) is similar to that of stars without accretion and without disk
(WTTSp). We interpret this dispersion as evidence of a real age spread since
the total uncertainties on age determinations, derived from Monte Carlo
simulations, are significantly smaller than the observed spread. This
conclusion is supported by the evidence of a decreasing of the
gravity-sensitive gamma index as a function of stellar ages. The presence of
the age spread is also supported by the spatial distribution and the kinematics
of old and young members. In particular, members with accretion and/or disk,
formed in the last 1 Myr, show evidence of subclustering around the cluster
center, in the Hourglass Nebula and in the M8-E region, suggesting a possible
triggering of star formation events by the O-type star ionization fronts.
