When was psychology accepted as an academic discipline?

When was psychology accepted as an academic discipline?