Bug fix to allow minDate, maxDate, availableDates and invertAvailable to work together

Before the minDate, maxDate and availableDates were being considered
and then inverted. This makes no sense!
Now the minDate and maxDate are considered, and then sperately the
availableDates are considered and then inverted.