You don't need a password for anything here, neither you've to worry much that the Airplane mode would get disabled by the kid. Of course, if the kid is smart then s/he would find a way to by-pass the restrictions imposed using the following solution.
For the solution, you need to use an automation app app like Tasker (paid but trial is available) or MacroDroid (free/Pro). I've demonstrated the solution using the latter because its free version does the job.
Note: Device needs to be rooted.
We would create a macro which would make sure that if the kid disables Airplane mode by any means the Airplane mode would get turned on automatically as long as the time period remains true.
- Install and launch MacroDroid.
- Tap Add Macro → Airplane Mode Changed → Airplane Mode Disabled → OK.
- Under Add Actions, tap Airplane Mode On/Off → Airplane Mode On → OK → (leave options unchecked) OK → proceed.
- Under Add Constraints, tap Time of Day → choose Start Time and Stop Time i.e. for the time period where you want Airplane mode to get enabled and remain active until another time is reached, such as 22:00 to 05:00 → OK → proceed.
- Name the macro as
Persist Airplane Mode
→ OK.
Your macros would show up under Macros at the default page of app.
Create a new macro to start the Airplane Mode for the time where you want the kid to sleep or go to bed:
- Tap Add Macro → Day/Time Trigger → choose Days of the week and Time of Day, such as Saturday, 22:00 → OK.
- Under Add Actions, tap Airplane Mode On/Off → Airplane Mode On → OK → (leave options unchecked) OK → proceed.
- Ignore Add Constraints and name the macro as
Start Airplane Mode
.
The Airplane mode can be turned off easily after the device is rebooted and before MacroDroid is started from startup. MacroDroid wouldn't activate the Airplane mode automatically after reboot unless told to do so.
To make sure that Airplane mode gets enabled automatically after reboot, make the following macro:
- Tap Add Macro → Device Boot.
- Under Add Actions, tap Airplane Mode On/Off → Airplane Mode On → OK → (leave options unchecked) OK → proceed.
- Under Add Constraints, tap Time of Day → choose Start Time and Stop Time i.e. for the time period where you want Airplane mode to get enabled and remain active until another time is reached, such as 22:00 to 05:00 → OK → proceed.
- Name the macro as
Activate On Boot
→ OK.
Now, create a final macro which would disable the Airplane mode at a particular time:
- Tap Add Macro → Day/Time Trigger → choose Days of the week and Time of Day, such as Saturday, 05:00 → OK.
- Under Add Actions, tap Airplane Mode On/Off → Airplane Mode Off → OK → (leave options unchecked) OK → proceed.
- Ignore Add Constraints and name the macro as
Stop Airplane Mode
.
You also need to activate MacroDroid as Device Administrator so that it can't be force-stopped or uninstalled easily.
- Go to Settings → Security → Device Administrators and choose MacroDroid in it.
- Also, go to Settings → Apps → MacroDroid → uncheck Show notifications so that its icon and notification doesn't remain visible or persistent.
I've not tested the SMS feature in MacroDroid but I've no reason to believe that it wouldn't work. Give it a try.