NEW YORK (AP) — A New York judge congratulated Donald Trump Jr. and his estranged wife, Vanessa, Thursday for resolving child custody issues as they proceed toward divorce.

State Supreme Court Justice Michael Katz began a brief proceeding in open court by saying he understood that they had agreed to resolve all issues regarding their five children and parental rights.

Lawyers said they expected a written agreement on child custody would be completed in several weeks.

"I congratulate you for working those things out," Katz told the couple, who stood before the judge, separated by their lawyers, though they entered and left court together.

Katz said they were blocking the children "from what could have been an invasive legal process."

The initial court appearance, which lasted less than 10 minutes, came after Vanessa Trump filed for divorce in March. Though the action was initially listed as uncontested, it was later changed to a contested action.

Norman Heller, a lawyer for Donald Trump Jr., said the couple also expects to quickly resolve financial conflicts because there were "only a few issues left" to resolve.

Katz offered them his help "to bridge any of those gaps."

"I can help resolve those issues," he said.

Donald Trump Jr. and his estranged wife Vanessa Trump appeared in a New York City courtroom Thursday for a divorce hearing. (July 26)

The couple arrived at the courthouse an hour early and walked into the courtroom from the same doorway as the judge, who entered just before them.

As they positioned themselves in front of the judge, Trump Jr. smiled toward his wife. Appearing relaxed, they each smiled at points throughout the proceeding.

The Trumps were married in 2005. Vanessa Trump filed for divorce in March. Afterward, they said in a joint statement that they will "always have tremendous respect for each other."

The 2007 birth of the couple's first child made Donald Trump Sr. a grandfather a decade before he became president.

Former Fox News Channel personality Kimberly Guilfoyle recently left the network amid news that she's dating Trump Jr. She has joined a super PAC supporting the president.