Penal code Section 278: taking minor from parent or guardian -- Punishment
Every person, not having a right to custody, who maliciously takes, entices away, keeps withholds, or conceals any child with the intent to detain or conceal that child from a lawful custodian shall be punished by imprisonment in a county jail not exceeding one year, a fine not exceeding one thousand dollars ($1,000), or both that fine and, or by imprisonment pursuant to subdivision (h) of Section 1170 for two, three, or four years, a fine not exceeding ten thousand dollars ($10,000), or both that fine and imprisonment. Also See: PC 207 Kidnapping PC 236 False Imprisonment
Criminal Charges such as the one above are fairly common in custody disputes, divorces, or similar factual patterns. While a person may not understand it is a criminal offense, because the child is theirs, there are laws and custody orders that must be followed.