The provisions of this article shall not apply to commitment to the custody of the State Department of Mental Health and Mental Retardation of mentally ill minors or children.