Dynamic date range on the calendar and (broken) datepicker.
Calendar now changes date range in response to changes in the date field.
Merged Luke's problems.