It is illegal to leave a child age six or younger unattended in a vehicle on a hot day:

It is never a good idea to leave a child unattended in a car. It is illegal to leave a child age six or younger unattended in a vehicle. A child may be left under the supervision of a person age 12 or older.

Wait, before you go

Ace Your California DMV Written Test with our Guaranteed Cheat Sheet