How long before the elections can the Democrats still replace Kerry? In NJ it is apparently anytime for a Democrat in spite of a filing deadline.
There are no statutory deadlines. A candidate, president elect, and president can resign any time they please. Not joking, that is the way it is, especially for a presidential election. When you pull the lever, you are voting for a party. The party chooses electors, and the electors vote for president, in December.