Perhaps this is the wrong place for this, but what is the difference between a cap (czapka) and a hat (kapelusz)? In my native english dialect, they are synonyms.
Look at images on Google. Simply "kapelusz" has a brim around. For example cowboys wear them.
Your links do not work but that makes sense, partially. What about baseball caps/hats which have a brim, but not all the way around?
Maybe the answer is better " when did you wear a hat ?" Because this past simple
The Polish sentence is in present simple, so why should the translation be in past simple?