R David Brofsky, an Israeli dayan, writes the following regarding your question
One should write the actual date of the wedding on the ketuba. If the
ketuba was written and dated before the day of the wedding ceremony,
and the kinyan and signing of the ketuba happened at a later date, the
ketuba is deemed a shtar mukdam, which is invalid (see Gittin 18a;
Shulchan Arukh, CM 43:7).
If the ketuba was written and the groom was
engaged in wedding matters (asukin be-oto ha-inyan) and the kinyan and
signing of the ketuba did not happen until evening, some Acharonim
validate the ketuba bedieved (see Shulchan Arukh, CM 43:16, and
Ha-Nisu’in Ke-Hilkhata 11:28).
Note the lack of validity of the ketuba most often doesn't mean the marriage is invalid, but requires re-doing the ketuba.
Of course, anyone facing such an issue should consult their rabbi
before implementing anything they learn here.