It's tricky and it depends on both context and convention, as usual.
"They enjoyed themselves at the party" is the most common form you are likely to encounter.
"They enjoyed themselves at the party and then went to see a movie."
"They enjoyed themselves at the party." is a complete sentence in itself, too.
Under some circumstances, you might see the 'during' construct:
"They enjoyed themselves during the party until the moment that George fell over" . Even with this example, you could use 'at' instead.
If there is some grammar rule to cover this, I don't know it.