(a)
Upon the filing of the petition, the clerk of the juvenile court shall set the same for hearing within 30 days, except as follows:
(1)
In the case of a minor detained in custody at the time of the filing of the petition, the petition must be set for hearing within 15 judicial days from the date of the order of the court directing such detention.
(2)
In the case of a minor not before the juvenile court at the time of the filing of the petition and for whom a warrant of arrest has been issued pursuant to Section 663, the hearing on the petition shall be stayed until the minor is brought before the juvenile court on the warrant of arrest. The clerk of the juvenile court shall set the petition for hearing within 30 days of the minor’s initial appearance in juvenile court on the petition, except that in the case of a minor detained in custody, the petition shall be set for hearing within 15 judicial days from the date of the order of the court directing such detention.
(b)
At the detention hearing, or any time thereafter, a minor who is alleged to come within the provisions of Section 601 or 602, may, with the consent of counsel, admit in court the allegations of the petition and waive the jurisdictional hearing.