Bad policy, though at first glance there is nothing in the constitution that says California (and other states) couldn't do such a thing.
Why bother voting in California if the state is going to award the Electoral votes the National candidate who has the most popular votes?
The people of California might just as well stay home because voting for President would just be a waste of time.