Some toddlers are potty trained by 18 months old but a lot of 2 years old's do still wear diapers full time and are not potty trained.
Even a lot of 3 and even some 4 year old's still wear diapers full time and especially during the night for bed wetting.
It's very normal for a 2 year old and even 3 year old toddler to wear diapers both day and night.
Different toddlers potty train at different times.