Added datepicker controls and functions to control newly selected dates.
The functions limit the dates' mins and maxes.