Article II, Section I gives Congress control to the timing of the appointment of presidential electors:
https://cons utioncenter.org/inter...ii/clauses/350The Congress may determine the Time of chusing the Electors, and the Day on which they shall give their Votes; which Day shall be the same throughout the United States.
3 US Code 1 is law which gives effect to this provision of the US Cons ution:
https://www.law.cornell.edu/uscode/text/3/1The electors of President and Vice President shall be appointed, in each State, on the Tuesday next after the first Monday in November, in every fourth year succeeding every election of a President and Vice President.
And 3 US Code 5 sets the safe harbor
https://www.law.cornell.edu/uscode/text/3/5If any State shall have provided, by laws enacted prior to the day fixed for the appointment of the electors, for its final determination of any controversy or contest concerning the appointment of all or any of the electors of such State, by judicial or other methods or procedures, and such determination shall have been made at least six days before the time fixed for the meeting of the electors, such determination made pursuant to such law so existing on said day, and made at least six days prior to said time of meeting of the electors, shall be conclusive, and shall govern in the counting of the electoral votes as provided in the Cons ution, and as hereinafter regulated, so far as the ascertainment of the electors appointed by such State is concerned.