I am not sure what you mean by "missing dates". Your script will populate the calendar with all possible dates between the min and the max dates, so there are no "missing dates" in the normal sense of the phrase.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein