A child should be out of diapers when they are potty trained.
I believe that you should not force a child to potty train and instead the child will potty train themselves whether it be at age 2, 3, 4 or even 5 years old.
Although most kids are ready to potty train by age 3 to 4 years old some just take longer and they should wear diapers until they no longer need them.
A child should be out of diapers at night once the child has become dry at night.
Daytime potty training typically occurs by age 2 to 4 years old in which the child no longer needs diapers in the daytime.
But nighttime wetting is different and although the child may be nighttime potty trained the child may still have bed wetting accidents.
Bed Wetting is different in that the child has no control over their bladder at night and won't wake to go pee and so they will pee the bed.
So until the child is dry they should wear a diaper at night so that the bed and their clothes stay dry.
Bed Wetting sometimes stops by age 5 to 8 years old while some kids may continue wetting the bed until they are 17 or even into adulthood.
Bed Wetting in children is normal and there's not much that can be done to stop it.
So diapers or pull ups are a good idea for the bed wetting child to keep them dry and keep the sheets and bed dry as well.