The correct option is D didn't
The question "Did they have....?" contains the verb 'did'.
The
reply "No, they _____." must also be filled with the same verb, as 'did'
implies that they did not have dinner. 'No, they didn't' forms an elliptical sentence.
The reply is an elliptical sentence, that means that some words have been omitted and instead have been implied earlier.
Hence, the verb 'didn't' is correct here and option C is right.
Option A: 'Didn't have' does not form an elliptical clause because 'have'
requires an object 'dinner'. We need a verb that does not require an
object, like 'didn't'.
Option B: 'Have not' is in the present perfect tense whereas the question is in relation to the past.
Option
D: 'Don't' is a simple present tense verb, but it isn't of the same form
as in the question asked before 'did have'. The reply must be coherent
with the question that has been asked.
Hence options A, B and D are incorrect.