time slider and check if enddate > startdate