dynamic calendars working on click