Init time in setDateRange function.