[1.6.x] Fixed #21186: Fixed regression when using date fields in the admin's list_filter.

Thanks to onlygoldi2201 for the report and to ramiro and apollo13
for the reviews.

Backport of 8f51ba669aba94eea684ea3f3429fd8e39e70679 from master.