Fix week/month date order issue after applying search filter

Culprit was the usage of HashMap instead of LinkedHashMap. However it should be made clear to use that or refactor the code to not rely on it at all. I will try to look at that as I originally wrote that part.