QMy husband and I have had trouble keeping our 21 / 2-year-old in her bedroom at nap time and bedtime, a problem that began when we moved her out of her crib and into a toddler bed three weeks ago.

We know that the move went well because our daughter loves her bed and her room, and she is really proud of herself for sleeping in a Big Girl bed. Her vocabulary is still quite small, however, so we don’t know why she won’t stay in this bed or whether we are expecting too much of her too soon.

Because we didn’t want her to be scared, feel isolated or think of her room as a prison, we left her door open at first, but that simply made it easier for her to leave. We then shut the door, but she quickly learned to open it. When we gave her a sticker for staying in her bed, she wanted another sticker even though she had gotten out of it again. And when we put her back to bed, she thought it was a game and giggled the entire time!

As a last resort, we placed a child-proof cover on her doorknob, then put her to bed and closed the door. She now tries the handle and fusses for about 5 to 10 seconds, then realizes that she can’t get out so she plays around in her room for 5 to 20 minutes and falls asleep in her new bed.

Is this the best way to handle the situation? Will our daughter lose interest in the door handle in time? Or should we put her back in the crib until she is old enough to stay in her toddler bed?

(Hadley Hooper/For The Washington Post)

ADon’t fret. You’re teaching your child to discipline herself. You’re teaching her well, and you’re doing it at just the right time.

Despite your qualms, you know that your little girl is old enough to fall asleep in her own bed because she already does it, nap after nap and night after night. She has to assert her independence at this age, however, so she tries to open the door and plays with her toys, but then she toddles into her toddler bed and falls asleep. Bedtime doesn’t get any better than that, especially with a 2-year-old. In another six months, you can probably take off the doorknob cover and even leave the door open because she won’t need to prove her independence as much as she does now.

You’re not only teaching your daughter to fall asleep like a pro, you’re also teaching her a skill that is, for you, non-negotiable. Another parent might insist that her toddler eat everything on his plate or that she be toilet-trained as soon as possible, but you need for your little girl to have firm rules at nap time and bedtime, and she’s doing her best to comply.

This is one of the minor miracles of parenthood. Children instinctively know which goals their mother or father values most, and as long as they feel loved and respected, they’ll try to reach them.

And so it is with discipline. Although you and your husband may not discipline in the same way, your child will accept your differences because she can read your cues so well.

No matter how well the two of you read your daughter’s cues, however, you’re bound to question your judgment and tinker with your own rules. Parents react to their child’s behavior far more than the child reacts to theirs.

Your daughter, you see, is a work in progress, changing from one month to the next. Just when you’re sure that you know how to guide her best, her brain will start thinking in a more mature way, or her body will handle a new hormone badly, or she will fall in love with astronomy or soccer or that new kid down the street. Every change your daughter makes will encourage you to tweak your opinions, your attitude and maybe your discipline, too, which can often be a good idea.

Slight changes can make your family stronger and more functional, but only if you talk with your daughter about the world and about herself, and if you listen to her woes with empathy and say no to her with kindness, even at 21 / 2. The need for respect starts early, and it never stops.

Questions? Send them to advice@margueritekelly.com.