sets proper date range in form