fix date sorting bug by using a cell factory and a comparator