'Will and Grace' star Sean Hayes remembers getting a 'seal of approval' from comedian Jerry Lewis

"Jerry's contribution to the entertainment business is just massive."

The "Will and Grace" actor shared his personal experiences with Lewis, who died at 91 on Aug. 20, 2017, for ABC's "The Year in Memoriam 2017," which airs on Monday, Dec. 18, at 10 p.m. ET.

Hayes, known for his own physical comedy in his role as Jack McFarland on “Will and Grace,” said he was inspired by Lewis’ commitment to his jokes and physical punchlines.

He said he especially loved Lewis’ physicalized music numbers in movies like “Cinderfella” and how Lewis moved his body and his face and contorted himself at every angle “just to get a laugh.”

“I mean, in ‘The Nutty Professor,’ when he walks into that office and it takes, I don’t know, seemingly five minutes, which is a long time to walk. And then he sits in the chair and he just keeps sinking into the chair,” Hayes said. “The confidence in that the time that this bit takes is going to pay off -- ‘I know it. I trust it.’ -- and it did!”

In 2002, Hayes played Lewis in the biographical television movie, “Martin and Lewis.” It was an opportunity that Hayes said intimidated him.

“When I got offered the part to play Jerry in ‘Martin and Lewis,’ it was daunting, scary, risky, freaky,” recalled Hayes. “After it was over, he said, ‘Great job.’ And I was relieved that I got the seal of approval from him.”

Hayes said that he shared with Lewis that he had grown up fatherless and would have loved to have a father figure like Lewis. Lewis later gifted Hayes a signed photo of Lewis.

“So it says, ‘For Sean, Love, Dad.’ And it brings joy to my heart. That’s ridiculous, who else walks around like that?” Hayes said jokingly of the photo. “I do, kind of. My pants are up here right now. You just can’t see it.”

Hayes added, “I loved his playfulness, what he calls the kid inside of him and that we all have, but he always tapped into it much deeper than we did.”

Watch the full story on ABC's "The Year in Memoriam 2017" on Monday, Dec. 18, at 10 p.m. ET.