fixed the valid dates in the calendar