There are three periods of time at which this question has different answers. Immediately after the elections, you might run into some problems, but immediately after the inauguration, there is no minimum time before the Vice President can take over.
After election day, before the electoral college votes
As the presidential electors haven't yet voted, there is no official President elect, although they may be given that title unofficially by the media. At this point, a candidate's party could replace the individuals on their ticket at will (subject to their party rules), or instruct their party's presidential electors to vote for a different candidate. Whether they would do so is impossible to predict, and may fall foul of faithless elector laws, which vary from state-to-state. In any case, the candidate which receives over 270 electoral votes, no matter whether that candidate ran for the VP position during the campaign, will become the President elect.
This redistribution of electoral votes has only happened to a candidate once - in 1872, Horace Greeley, the Liberal Republican candidate, died before the college could meet. His 66 electoral votes were split between four other candidates, and only 18 went to his running-mate.
After the electoral college votes, before inauguration
The most relevant legislation would seem to be the 20th Amendment, section 3 of which states:
If, at the time fixed for the beginning of the term of the
President, the President elect shall have died, the Vice President
elect shall become President. If a President shall not have been
chosen before the time fixed for the beginning of his term, or if the
President elect shall have failed to qualify, then the Vice President
elect shall act as President until a President shall have qualified;
and the Congress may by law provide for the case wherein neither a
President elect nor a Vice President elect shall have qualified,
declaring who shall then act as President, or the manner in which one
who is to act shall be selected, and such person shall act accordingly
until a President or Vice President shall have qualified.
So the Vice President may only become Acting President immediately if the President dies, or has failed to qualify, rather than being incapable. The Vice President elect cannot replace the President elect before the inaugration.
The relevant legislation, in this case, is section 3-4 of the 25th Amendment, which state:
Whenever the President transmits to the President pro tempore of the
Senate and the Speaker of the House of Representatives his written
declaration that he is unable to discharge the powers and duties of
his office, and until he transmits to them a written declaration to
the contrary, such powers and duties shall be discharged by the Vice
President as Acting President.
Whenever the Vice President and a majority of either the principal
officers of the executive departments or of such other body as
Congress may by law provide, transmit to the President pro tempore of
the Senate and the Speaker of the House of Representatives their
written declaration that the President is unable to discharge the
powers and duties of his office, the Vice President shall immediately
assume the powers and duties of the office as Acting President.
Thereafter, when the President transmits to the President pro tempore
of the Senate and the Speaker of the House of Representatives his
written declaration that no inability exists, he shall resume the
powers and duties of his office unless the Vice President and a
majority of either the principal officers of the executive department
or of such other body as Congress may by law provide, transmit within
four days to the President pro tempore of the Senate and the Speaker
of the House of Representatives their written declaration that the
President is unable to discharge the powers and duties of his office.
Thereupon Congress shall decide the issue, assembling within
forty-eight hours for that purpose if not in session. If the Congress,
within twenty-one days after receipt of the latter written
declaration, or, if Congress is not in session, within twenty-one days
after Congress is required to assemble, determines by two-thirds vote
of both Houses that the President is unable to discharge the powers
and duties of his office, the Vice President shall continue to
discharge the same as Acting President; otherwise, the President shall
resume the powers and duties of his office.
In both cases, voluntary (section 3), and involuntary (section 4), there is no minimum time which must elapse before the Vice President assumes the role of Acting President. If the act is voluntary, the VP takes over immediately after the President declares themself incapable, and if not, then the VP takes over immediately after declaring the President incapable, supported by a majority of principal officers.
So, to sum up, there is no minimum time frame for replacement unless the replacement comes in the period between the electoral college voting, and before the President elect is inaugurated. At this point, the VP only becomes Acting President at the inauguration if the President elect actually dies, or is found to be ineligible for office - as a result, they would have to wait until after the inauguration to replace the President using the 25th Amendment.