(a) If, during the pendency of a dissolution or annulment of marriage, the wife is pregnant, she may so allege in the pleadings. The parties may in their pleadings allege and answer that the child born of the pregnancy will or will not be issue of the marriage.(b) If the parties to a dissolution or annulment of marriage disagree as to whether or not the husband is the father of the child born of the pregnancy, the court shall hold a hearing within a reasonable period after the birth of the child to determine paternity.