Added pagination based on the date groups.