From
here:
The SCOTUS decided in
Calder v. Bull (1798) that the ex post facto law prohibition in Article 1, section 10, of the U.S. Constitution only applies to criminal law, not civil law and that, as faulty as the logic might have been, has not been overturned. In fact, only reinforced by more recent decisions. If a challenge to this Colorado elector issue got thrown out, I understand why.