fixed the calendar date bug