They could replace her after the convention. The only real drop dead dates are the deadlines for declaring ones candidacy in each state. After those deadlines pass there would be no way for them to put another candidate on the ballots. Then again, they are Democrats so they would probably just change the rules - you know, to make it fair.
No doubt the Republicans would assist the Democrats to allow their alternate candidate to be able to run.