President Trump basked in the glow Saturday of a week so successful that it even won praise from aides to former President ­Barack Obama.

Trump had plenty of success to reflect upon as he donned a white polo shirt and red cap to enjoy five hours at his Trump International Golf Club in West Palm Beach, Fla.

He had had a successful two-day meeting with Chinese President Xi Jinping.

The Senate voted Friday to approve his first Supreme Court nominee.

And he had punished Syrian strongman Bashar al-Assad for the cruel use of sarin gas against his own people by ordering a missile strike on an important air base.

“Donald Trump has done the right thing on Syria,” tweeted Anne-Marie Slaughter, who was a high-level State Department official during Obama’s first term. “Finally!! After years of useless handwringing in the face of hideous atrocities.”

Former Secretary of State John Kerry was “absolutely supportive” of the strike, a source close to him told Politico. The source said Kerry felt “gratified to see that it happened quickly,” days after a nerve-gas attack on civilians that killed 87.

“Our administration never would have gotten this done in 48 hours,” another former Obama administration official told Politico. “It’s a complete indictment of Obama.”

At the golf course, Trump tweeted praise for US service members involved in Friday’s attack.

“Congratulations to our great military men and women for representing the United States, and the world, so well in the Syria attack,” he wrote at 10:54 a.m.

The tweet was Trump’s first ­social-media acknowledgment of the assault on Shayrat air base, which Assad’s forces allegedly used to launch their sarin attack.

Trump tweeted again on Saturday afternoon to explain why the Syrian airport wasn’t completely destroyed.

“The reason you don’t generally hit runways is that they are easy and inexpensive to quickly fix (fill in and top)!” he wrote at 3 p.m.

The message responded to criticism that the Shayrat air base was back in use soon after the US hit it with 59 Tomahawk missiles.

Foreign allies Turkey and Saudi Arabia also praised the attack, which was retaliation for a chemical attack that killed scores of ­people in the town of Khan Sheikhoun.

Turkish Foreign Minister Mevlut Cavusoglu described the decision to retaliate for the chemical attack as welcome, but not enough.

If similar interventions do not continue until Assad is removed from power, “then this would remain a cosmetic intervention,” ­Cavusoglu said.

In a phone call with Trump, Saudi King Salman called the airstrikes “courageous.”

Salman said the missile attack was the right response to “the crimes of this regime to its people in light of the failure of the international community to stop it.”