calendar: enhance tasks sorting order by comparing endDate then startDate