The topic has been discussed before.
https://www.italki.com/discussion/205817
The brief answer is that "didn't have" became more common than "hadn't" in the 1930s in the U.S. and in the 1960s in Great Britain. Both are correct, but "didn't have" is more common now.